[LLVMbugs] [Bug 11556] New: VLA folded pedantic error in -std=gnu99

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Dec 13 10:41:05 PST 2011


http://llvm.org/bugs/show_bug.cgi?id=11556

             Bug #: 11556
           Summary: VLA folded pedantic error in -std=gnu99
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: max at duempel.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


The following code generates a warning with -pedantic:

static const int size = 100;
void foo(void) { int data[size]; }

vla.c:2:27: warning: variable length array folded to constant array as an
extension [-pedantic]

The warning occurs only with "-std=gnu99" (or no "std" option, which defaults
to gnu99). It disappears with "-std=c99". Both C99 modes should behave the same
way here, and this warning makes sense only in "gnu89" mode.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list