https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69982
Bug ID: 69982 Summary: missing warning when using __thread with -std=c99 -pedantic Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: vincent-gcc at vinc17 dot net Target Milestone: --- When I compile the following program with -std=c99 -pedantic, I get a warning for _Thread_local but not for __thread while both are invalid in C99. This is not consistent! __thread int x; _Thread_local int y; int main(void) { return 0; } I get: $ gcc-snapshot -std=c99 -pedantic tst.c -o tst tst.c:2:1: warning: ISO C99 does not support '_Thread_local' [-Wpedantic] _Thread_local int y; ^~~~~~~~~~~~~ This occurs with: gcc (Debian 20160125-1) 6.0.0 20160125 (experimental) [trunk revision 232803] and previous versions such as 4.9.3 and 5.3.1.