-
Notifications
You must be signed in to change notification settings - Fork 15.1k
Open
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 party
Description
The following program demonstrates the issue:
int main(){
typedef int x;
{
auto x y;
}
}The declaration auto x y; should be "declaration of y with type x" where auto has no effect because it's not specifying type inference here. However, in C23 mode Clang will see the x after auto and then assume that it should be "declaration of x with inferred type". Afterwards it will then complain because there is no initializer. GCC and Clang in pre-C23 modes will accept this code. Related to #164921 example 3, but I split this into a separate issue because it changes the meaning of valid code.
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 party