[LLVMbugs] [Bug 1891] New: Addres of unnamed array not recognized as constant

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Jan 1 23:39:02 PST 2008


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

           Summary: Addres of unnamed array not recognized as constant
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Semantic Analyzer
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: sharparrow1 at yahoo.com
                CC: llvmbugs at cs.uiuc.edu


The following file scope definition:

int *p = (int []){2, 4};

gives this error:

inittest.c:5:18: error: initializer element is not constant
int *p = (int []){2, 4};
                 ^~~~~~
using clang -fsyntax-only.  However, it is in fact correct per C99.

Note that this example is straight out of the standard.


-- 
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