-
Notifications
You must be signed in to change notification settings - Fork 14.6k
Open
Open
Copy link
Labels
c23clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyVerified by a second partydiverges-from:gccDoes the clang frontend diverge from gcc on this issueDoes the clang frontend diverge from gcc on this issue
Description
It seems like Clang is working to support C23 new tag compatibility rules, however there are some issues currently. Here is one of them:
struct A{int h;};
int main(){
extern struct A x;
enum E:int{e};
struct A{enum E h;};
extern struct A x;
}
Clang rejects this code because it considers the two structure types to be incompatible. They should be compatible because int and enum E are compatible, exact type equivalence is not required by the standard. The resulting composite type for x should have h as the composite type of int and enum E.
Metadata
Metadata
Assignees
Labels
c23clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyVerified by a second partydiverges-from:gccDoes the clang frontend diverge from gcc on this issueDoes the clang frontend diverge from gcc on this issue