http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60932
Bug ID: 60932 Summary: <stdatomic.h> is not C++ compatible Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: sebastian.hu...@embedded-brains.de Should <stdatomic.h> work with C++? I use GCC as a cross-compiler for RTEMS targets. RTEMS uses Newlib as C library. I ported the FreeBSD version of <stdatomic.h> to Newlib and use this successfully with C/C++ and GCC pre-4.9 versions. http://svnweb.freebsd.org/base/head/sys/sys/stdatomic.h?revision=263998&view=markup Now with GCC 4.9 I have the problem that two <stdatomic.h> files are installed, e.g. find /opt/rtems-4.11/ -name stdatomic.h /opt/rtems-4.11/lib64/gcc/sparc-rtems4.11/4.9.0/include/stdatomic.h /opt/rtems-4.11/sparc-rtems4.11/include/stdatomic.h The first is provided by GCC, the second by Newlib. The GCC version is the one used. Now I get this when I compile a C++ source which indirectly includes <stdatomic.h>: sparc-rtems4.11-g++ -std=c++11 somefile.cc /opt/rtems-4.11/lib64/gcc/sparc-rtems4.11/4.9.0/include/stdatomic.h:40:9: error: '_Atomic' does not name a type typedef _Atomic _Bool atomic_bool; Is this working as intended?