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

             Bug #: 51740
           Summary: warning "is used uninitialized in this function" is
                    missing if the variable initialized later
    Classification: Unclassified
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: s...@szo.hu


Created attachment 26231
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26231
Code that should warn

gcc fails to emit the "is used uninitialized in this function" warning, if the
offending variable is initialized via a function later on.

See attachment. If compiled with 
gcc  -Wall  bug.c
gcc issues no warning. If line 13 is commented out, the correct
bug.c:11:9: warning: ‘offender’ is used uninitialized in this function
[-Wuninitialized]
is emitted.
I think it's not the same as #18501, because replacing line 13 with
offencer = 0;
still produces the warning correctly.

Reply via email to