stdatomic.h broken on GCC-5.4.0 (error: request for member ‘__val’ in something not a structure or union)

Corinna Vinschen
Thu Feb 23 10:19:00 GMT 2017

On Feb 23 11:17, Corinna Vinschen wrote:
> On Feb 23 08:13, Sebastian Huber wrote:
> > This file worked before GCC shipped its own stdatomic.h. You should use the
> > GCC provided stdatomic.h. Maybe we should remove the stdatomic.h from
> > Newlib.
> We should continue to provide it for older GCC versions.  We could
> do something like
>   #if __GNUC_PREREQ__(X,Y)
>   #undef _STDATOMIC_H_

The undef is apparently not even required.  GCC uses _STDATOMIC_H without
trailing underscore.

>   #include_next <stdatomic.h>
>   #else
>   [rest of our own stdatomic.h]
>   #endif
> X.Y would be the 1st gcc version providing its own stdatomic.h


Corinna Vinschen
Cygwin Maintainer
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <>

More information about the Newlib mailing list