http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53769

--- Comment #4 from Vincent Lefèvre <vincent-gcc at vinc17 dot net> 2012-06-26 
05:17:31 UTC ---
(In reply to comment #3)
> Such a test is not meaningful for documented incomplete support; in the 
> absence of claims of conformance, __STDC_VERSION__ can only be interpreted 
> as a statement of intent

OK, this makes clear that for portability, programs should do configure tests
instead of relying on the values of standard macros. I think this should be
documented in the GCC manual (I haven't checked the latest versions, but there
were/are similar problems with C99).

> (The code you give should be rejected if __STDC_NO_THREADS__ is not 
> defined, because of the constraint in 6.7.1#3: "In the declaration of an 
> object with block scope, if the declaration specifiers include 
> _Thread_local, they shall also include either static or extern.".)

Oops, yes, I did a mistake when copying the code: the declaration should have
been outside main().

Reply via email to