[LLVMbugs] [Bug 2703] New: invalid " arrays with static storage duration must have constant integer length"

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu Aug 21 15:13:02 PDT 2008


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

           Summary: invalid "arrays with static storage duration must have
                    constant integer length"
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Semantic Analyzer
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: kremenek at apple.com
                CC: clattner at apple.com, kremenek at apple.com,
                    llvmbugs at cs.uiuc.edu, sharparrow1 at yahoo.com,
                    snaroff at apple.com, daniel at zuster.org


gcc -fsyntax-only eats the following; clang -fsyntax-only does not:

typedef long unsigned int size_t;
typedef unsigned int uint32_t;
uint32_t A[(size_t) (100. * 120.)];
struct C { uint32_t A[(size_t) (100 * 120)]; } c;
struct B { uint32_t A[(size_t) (100. * 120.)]; } b;

the error:

error: arrays with static storage duration must have constant integer length
struct B { uint32_t A[(size_t) (100. * 120.)]; } b;
                    ^
1 diagnostic generated.

Note that this warning occurs only inside the struct definition.  The
definition outside the struct has no error:

  uint32_t A[(size_t) (100. * 120.)];


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