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

             Bug #: 51756
           Summary: wrong warning: uninitialized variable put into program
                    memory area
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: minor
          Priority: P3
         Component: target
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: g...@gcc.gnu.org
                CC: eric.wedding...@atmel.com
            Target: avr


The following test case produces a false warning:

char foo (void)
{
    extern const __pgm char v[];
    return v[0];
}

$ avr-gcc -c foo.c -Wall
foo.c: In function 'foo':
foo.c:3:29: warning: uninitialized variable 'v' put into program memory area
[-Wuninitialized]



avr_encode_section_info should test for DECL_EXTERNAL.

Reply via email to