[clang] clang: Improve block-scope thread-local diagnostic (PR #234704)
Chen Miao via cfe-commits
cfe-commits at lists.llvm.org
Thu Oct 29 03:38:24 PDT 2026
https://github.com/ChenMiaoi commented:
Clang also treats static and extern variables as having global storage internally. [C11 6.7.1](https://www.sigbus.info/n1570#6.7.1) says that a block-scope object declared with `_Thread_local` must also be declared with either static or extern, and that if `_Thread_local` appears in any declaration of an object, it must appear in every declaration of that object. So I think this change makes sense.
https://github.com/llvm/llvm-project/pull/234704
More information about the cfe-commits
mailing list