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

--- Comment #1 from joseph at codesourcery dot com <joseph at codesourcery dot 
com> 2012-06-25 18:55:22 UTC ---
On Mon, 25 Jun 2012, patrick.pelissier at gmail dot com wrote:

> When building a C program with -std=c11, GCC doesn't define 
> __STDC_NO_THREADS__ &  __STDC_NO_ATOMIC__ whereas it doesn't support theses
> features (yet) and still defines __STDC_VERSION__ to 201112L.

C11 support is documented as substantially incomplete.  I believe there is 
work in progress on a branch to add support for the atomics interfaces 
(likely including GCC providing stdatomic.h given how closely related that 
is to the compiler, even though it's not a header required for 
freestanding implmentations).  As for the threading functionality, that's 
substantially a library issue and glibc 2.16 will predefine 
__STDC_NO_THREADS__ in stdc-predef.h to declare the lack of library 
support as of that glibc version.  The final piece is implicit 
preinclusion of stdc-predef.h so that the macros do appear to be defined 
right from the start of the translation unit - I have a 4.8 version of my 
patch <http://gcc.gnu.org/ml/gcc-patches/2009-04/msg01444.html> but need 
to debug problems with its interaction with PCH.

Reply via email to