-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaclang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"duplicateResolved as duplicateResolved as duplicate
Description
Bugzilla Link | 3669 |
Resolution | DUPLICATE |
Resolved on | Mar 12, 2010 00:57 |
Version | unspecified |
OS | All |
CC | @efriedma-quic |
Extended Description
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.
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaclang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"duplicateResolved as duplicateResolved as duplicate