public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/44042]  New: [4.4, 4.5,4.6 Regression] Missing warning for unitialized varaible in switch statement
@ 2010-05-08 14:58 tkoenig at gcc dot gnu dot org
  2010-05-08 14:59 ` [Bug c/44042] " tkoenig at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2010-05-08 14:58 UTC (permalink / raw)
  To: gcc-bugs

ig25@linux-fd1f:/tmp> cat haha.c
int f(n)
{
  int r;
  switch(n)
    {
    case 1:
      r = 3;
    }
  return r;
}
ig25@linux-fd1f:/tmp> gcc -O3 -c -Wall haha.c
ig25@linux-fd1f:/tmp> gcc -v
Es werden eingebaute Spezifikationen verwendet.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/ig25/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper
Ziel: x86_64-unknown-linux-gnu
Konfiguriert mit: ../fortran-dev/configure --prefix=/home/ig25
--enable-languages=all,ada --with-mpc=/usr/local
Thread-Modell: posix
gcc-Version 4.6.0 20100430 (experimental) (GCC)
ig25@linux-fd1f:/tmp> gcc-3.3 -O3 -c -Wall haha.c
haha.c: In function `f':
haha.c:3: warning: `r' might be used uninitialized in this function

Also fails for 4.4 and 4.5.


-- 
           Summary: [4.4, 4.5,4.6 Regression] Missing warning for
                    unitialized varaible in switch statement
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tkoenig at gcc dot gnu dot org


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


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

end of thread, other threads:[~2010-05-09 11:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-08 14:58 [Bug c/44042] New: [4.4, 4.5,4.6 Regression] Missing warning for unitialized varaible in switch statement tkoenig at gcc dot gnu dot org
2010-05-08 14:59 ` [Bug c/44042] " tkoenig at gcc dot gnu dot org
2010-05-08 15:00 ` [Bug c/44042] [4.4/4.5/4.6 " tkoenig at gcc dot gnu dot org
2010-05-08 15:33 ` [Bug c/44042] [4.1/4.2/4.4/4.5/4.6 " hjl dot tools at gmail dot com
2010-05-08 16:39 ` rguenth at gcc dot gnu dot org
2010-05-09 11:12 ` tkoenig at gcc dot gnu dot org
2010-05-09 11:13 ` rguenther at suse dot de

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