-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Closed
Labels
c23clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"obsoleteIssues with old (unsupported) versions of LLVMIssues with old (unsupported) versions of LLVM
Description
I have read #149965 but this seems like a different issue.
I understand that the program struct A { int a; }; struct A { int a; };
is valid C23. GCC 15.2 accepts it with -std=c23
and rejects it with -std=c17
. It is rejected by Clang 20.1.0 with -std=c23
:
<source>:5:8: error: redefinition of 'A'
5 | struct A { int a; };
| ^
<source>:3:8: note: previous definition is here
3 | struct A { int a; };
| ^
1 error generated.
Compiler returned: 1
CE link: https://gcc.godbolt.org/z/Ej7vzY4z5
Metadata
Metadata
Assignees
Labels
c23clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"obsoleteIssues with old (unsupported) versions of LLVMIssues with old (unsupported) versions of LLVM