public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/30856]  New: Missing "warning: '$FOO' may be used uninitialized in this function" in trivial case
@ 2007-02-19  9:24 christoph dot mallon at gmx dot de
  2007-02-19 10:05 ` [Bug c/30856] [4.1/4.2/4.3 Regression] " rguenth at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: christoph dot mallon at gmx dot de @ 2007-02-19  9:24 UTC (permalink / raw)
  To: gcc-bugs

int f(int x)
{
  int y;
  if (x == 42) y = 23;
  return y;
}

This simple function results in no warning about the possibly uninitialized
local variable 'y' when using the following compiler versions (compiler flags:
-O -Wall):
GCC 4.1.2 20070205
GCC 4.2.0 20070214
GCC 4.3.0 20070209

The warning is correctly reported by GCC 2.95.3, GCC 3.4.6 20060305 and GCC
4.0.4.


-- 
           Summary: Missing "warning: '$FOO' may be used uninitialized in
                    this function" in trivial case
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: christoph dot mallon at gmx dot de


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30856


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2009-02-07 21:29 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-19  9:24 [Bug c/30856] New: Missing "warning: '$FOO' may be used uninitialized in this function" in trivial case christoph dot mallon at gmx dot de
2007-02-19 10:05 ` [Bug c/30856] [4.1/4.2/4.3 Regression] " rguenth at gcc dot gnu dot org
2007-02-19 10:09 ` rguenth at gcc dot gnu dot org
2007-02-19 10:12 ` [Bug middle-end/30856] " pinskia at gcc dot gnu dot org
2007-02-19 13:57 ` christoph dot mallon at gmx dot de
2007-02-19 14:07 ` muntyan at tamu dot edu
2007-02-19 14:26 ` christoph dot mallon at gmx dot de
2007-02-19 15:57 ` rguenth at gcc dot gnu dot org
2007-02-19 16:28 ` christoph dot mallon at gmx dot de
2007-02-19 18:44 ` pinskia at gcc dot gnu dot org
2007-02-20  6:02 ` christoph dot mallon at gmx dot de
2009-02-07 21:21 ` [Bug middle-end/30856] missing uninitialized variable warning (CCP) manu at gcc dot gnu dot org
2009-02-07 21:29 ` manu 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).