Hello,

I test currently the GCC 4.9 release branch. 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. 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?

--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

Reply via email to