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

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).