[Bug c/53769] [C11]: Macros __STDC_NO_THREADS__ / __STDC_NO_ATOMIC__ missing.
joseph at codesourcery dot com
gcc-bugzilla@gcc.gnu.org
Tue Jun 26 17:14:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53769
--- Comment #5 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2012-06-26 17:13:52 UTC ---
On Tue, 26 Jun 2012, vincent-gcc at vinc17 dot net wrote:
> 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
Exactly. Cf. the issues GCC had with system headers on FreeBSD checking
__cplusplus to enable C++11 features (where GCC generally has more C++11
support than Clang, but not the particular feature used by those headers;
bug 51705).
Eventually there will be features implemented in all compilers people are
likely to care about and those features can be used without worrying about
compilers from during the transitional period. But during the
transitional period while major features of a new standard such as C++11
or C11 are being implemented by compilers, you need to test for the
features you want to use. And it's entirely plausible that an
implementation will have fully functional _Thread_local without C11
threads.h (thread-local storage for pthreads or another form of threads),
so test for what you actually want to use.
More information about the Gcc-bugs
mailing list