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

            Bug ID: 60444
           Summary: No -Wmaybe-uninitialized warning
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: chengniansun at gmail dot com

The auto variable "x" may be uninitialized if "b" is not zero. 

$: cat s.c 
extern void foo();
int test(int b) {
  int x;
  if (b) {
      foo();
  } else {
    x = 1;
  }
  return x;
}
$: gcc-trunk -Wmaybe-uninitialized -c s.c -O3

Reply via email to