public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/23193] New: useless comparison warning
@ 2005-08-02 6:12 phython at gcc dot gnu dot org
2005-08-02 6:14 ` [Bug c/23193] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: phython at gcc dot gnu dot org @ 2005-08-02 6:12 UTC (permalink / raw)
To: gcc-bugs
GCC should probably warn about useless comparison.
e.g.
#include <stdlib.h>
extern int *bar (int *);
int * foo (int a, int *c, int *b) {
int *ret = NULL;
if (a)
ret = c;
else
ret == bar (b);
return ret;
}
--
Summary: useless comparison warning
Product: gcc
Version: 4.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: phython at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23193
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-08-02 6:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-02 6:12 [Bug c/23193] New: useless comparison warning phython at gcc dot gnu dot org
2005-08-02 6:14 ` [Bug c/23193] " pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).