Skip to content

C23 thread_local is mapping to C++ thread_local, not C11 _Thread_local #70068

@Fznamznon

Description

@Fznamznon

Per 6.7.1 p4

In the declaration of an object with block scope, if the declaration specifiers include thread_local,
they shall also include either static or extern.

gcc does complain.

Online demo https://godbolt.org/z/YorncrhKW

cc @AaronBallman

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepts-invalidc23clang: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