[Bug c/69982] missing warning when using __thread with -std=c99 -pedantic
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69982 --- Comment #1 from Vincent Lefèvre --- Note: This actually means that a program that switches from __thread to _Thread_local (which could be regarded as more portable) could suddenly fail to build with "-std=c99 -pedantic -Werror".
[Bug c/69982] missing warning when using __thread with -std=c99 -pedantic
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69982 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #2 from Jakub Jelinek --- Well, there is a difference, __thread is an extension, while _Thread_local is standard in a later version of the standard, and __thread uses the implementation namespace, so it is similar for the compiler not complaining about __attribute__((__noinline__)) even in -std=c99 -pedantic, or about __extension__ etc.
[Bug c/69982] missing warning when using __thread with -std=c99 -pedantic
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69982 --- Comment #3 from Vincent Lefèvre --- (In reply to Jakub Jelinek from comment #2) > [...] and __thread uses the implementation namespace, [...] Is this really the implementation namespace? The C standard says: "All identifiers that begin with an underscore and either an uppercase letter or another underscore are always reserved for any use." so that there doesn't seem to be a difference between __thread (underscore + underscore) and _Thread_local (underscore + uppercase letter). What if the C committee decided to choose __thread instead of _Thread_local?
[Bug c/69982] missing warning when using __thread with -std=c99 -pedantic
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69982 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org --- Comment #4 from Marek Polacek --- Doesn't seem like a bug.
[Bug c/69982] missing warning when using __thread with -std=c99 -pedantic
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69982 --- Comment #5 from Vincent Lefèvre --- (In reply to Marek Polacek from comment #4) > Doesn't seem like a bug. Could you argument? Why is __thread regarded as an extension but _Thread_local cannot be regarded as an extension as well? And is there any reason to disable the warning for such an extension?