-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Open
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaclang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"enhancementImproving things as opposed to bug fixing, e.g. new or missing featureImproving things as opposed to bug fixing, e.g. new or missing feature
Description
| Bugzilla Link | 11036 |
| Version | unspecified |
| OS | Linux |
| CC | @berolinux,@efriedma-quic |
Extended Description
With the following code:
class C {
int i;
void f (void) {
typedef int a[sizeof (i)];
typedef struct {
int a[sizeof (i)];
} s;
}
};I get the following error from clang:
a.cc:7:18: error: invalid use of nonstatic data member 'i'
int a[sizeof (i)];
^
1 error generated.
Ie. clang doesn't like sizeof(i) in a struct, but it's ok in a non-struct. Looks like a bug to me.
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"enhancementImproving things as opposed to bug fixing, e.g. new or missing featureImproving things as opposed to bug fixing, e.g. new or missing feature