[LLVMbugs] [Bug 2951] New: llvm-gcc error on static initializer

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Sat Oct 25 13:28:02 PDT 2008


           Summary: llvm-gcc error on static initializer
           Product: tools
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: compile-fail
          Severity: normal
          Priority: P2
         Component: llvm-gcc
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: gohman at apple.com
                CC: llvmbugs at cs.uiuc.edu

GCC 4.2 (and other versions) accept this C testcase without error:

void *p = ((void*)&((char*)0)[0]);

llvm-gcc-4.2 rejects it with this message:

t.c:1: error: initializer element is not constant

This is reproducible on both trunk and the 2.4 prerelease.

This prevents llvm-gcc from compiling SQLite version 3.6.4,
which is the current version at this time.  The specific
error message is:

sqlite3.c:12108: error: initializer element is not constant

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