public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/51371] New: compilation should produce warning
@ 2011-12-01 2:58 gideon425.gb5 at mailnull dot com
2011-12-01 3:01 ` [Bug c/51371] " pinskia at gcc dot gnu.org
2011-12-02 12:21 ` rguenth at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: gideon425.gb5 at mailnull dot com @ 2011-12-01 2:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51371
Bug #: 51371
Summary: compilation should produce warning
Classification: Unclassified
Product: gcc
Version: 4.6.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: gideon425.gb5@mailnull.com
unsigned long l;
unsigned long l2;
void x()
{
if (l >= 0) l2 = 1;
}
compiling the above code with -Wlogical-op should give a warning
as l can never be negative
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c/51371] compilation should produce warning
2011-12-01 2:58 [Bug c/51371] New: compilation should produce warning gideon425.gb5 at mailnull dot com
@ 2011-12-01 3:01 ` pinskia at gcc dot gnu.org
2011-12-02 12:21 ` rguenth at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-12-01 3:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51371
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-12-01 03:00:47 UTC ---
t12.c:6:3: warning: comparison of unsigned expression >= 0 is always true
[-Wtype-limits]
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c/51371] compilation should produce warning
2011-12-01 2:58 [Bug c/51371] New: compilation should produce warning gideon425.gb5 at mailnull dot com
2011-12-01 3:01 ` [Bug c/51371] " pinskia at gcc dot gnu.org
@ 2011-12-02 12:21 ` rguenth at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-12-02 12:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51371
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-12-02 12:21:05 UTC ---
>= is not a logical op.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-12-02 12:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-01 2:58 [Bug c/51371] New: compilation should produce warning gideon425.gb5 at mailnull dot com
2011-12-01 3:01 ` [Bug c/51371] " pinskia at gcc dot gnu.org
2011-12-02 12:21 ` rguenth at gcc dot gnu.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).