Skip to content

Auto is incorrectly rejected in C23 when it occurs after the type specifiers in a declaration #164121

@Halalaluyafail3

Description

@Halalaluyafail3

The following program demonstrates the issue:

int main(){
    auto long long d1;
    long auto long d2;
    long long auto d3;
}

The order of declaration specifiers in a declaration shouldn't matter, so all 3 declarations should be accepted. However, Clang specifically rejects the third declaration of d3 and only in C23 mode. GCC and Clang in a pre-C23 mode will accept this code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    c23clang:frontendLanguage frontend issues, e.g. anything involving "Sema"confirmedVerified by a second party

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions