[...@gnu-6 tmp]$ cat x.c
enum foo
{
  foo1,
  foo2
} foo;

int
bar ()
{
  int x;
  switch (foo)
    {
    case foo1:
      x = 3;
      break;
    case foo2:
      x = 8;
      break;
    }
  return x;
}
[...@gnu-6 tmp]$ gcc -Wall -S x.c -O
x.c: In function âbarâ:
x.c:10: warning: âxâ may be used uninitialized in this function
[...@gnu-6 tmp]$


-- 
           Summary: Unnecessary uninitialized warning
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hjl dot tools at gmail dot com


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

Reply via email to