[LLVMbugs] [Bug 3669] New: [clang on Wine]: constant integer size rejected as not being constant
    bugzilla-daemon at cs.uiuc.edu 
    bugzilla-daemon at cs.uiuc.edu
       
    Wed Feb 25 10:37:13 PST 2009
    
    
  
http://llvm.org/bugs/show_bug.cgi?id=3669
           Summary: [clang on Wine]: constant integer size rejected as not
                    being constant
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Semantic Analyzer
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: kremenek at apple.com
                CC: llvmbugs at cs.uiuc.edu
The following self-contained code example (reduced from a case in Wine) is
rejected by Clang because the size of the array is deemed not a constant:
typedef unsigned long UINT_PTR, *PUINT_PTR;
typedef struct HHOOK__ {} *HKEY;
static HKEY special_root_keys[((UINT_PTR)((HKEY) 0x80000006) -
(UINT_PTR)((HKEY) 0x80000000) + 1)];
The error emitted by clang:
t.c:3:13: error: variable length array declaration not allowed at file scope
static HKEY special_root_keys[((UINT_PTR)((HKEY) 0x80000006) -
(UINT_PTR)((HKEY) 0x80000000) + 1)];
            ^                
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 diagnostic generated.
-- 
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