[Bug c/82679] Uses of typedefs of arrays of _Atomic-qualified types are rejected
olivier.delande.spam at googlemail dot com
gcc-bugzilla@gcc.gnu.org
Mon Oct 23 15:52:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82679
--- Comment #4 from olivier.delande.spam at googlemail dot com ---
(In reply to Marek Polacek from comment #3)
> Sorry, I probably shouldn't have closed this. I guess what we want to
> reject is
>
> typedef int T[10];
> _Atomic T a;
>
> but not your example.
Indeed, that is exactly what I would expect (from my understanding of the
standard), and, as far as I can tell, that is what clang does. I have not
tested other compilers.
To anyone else is affected by this: a workaround (besides not using typedef for
such array types) is to wrap the atomic element type in a struct.
Thanks!
More information about the Gcc-bugs
mailing list