Should atomic_xxx() functions reject not-_Atomic() arguments ?
Sat Mar 7 11:00:39 GMT 2020
On 3/6/20 5:45 PM, Jonathan Wakely wrote:
> On Fri, 6 Mar 2020 at 16:17, Chris Hall <email@example.com> wrote:
>> FWIW: clang gets this right, and where the Standard says a parameter
>> must be an _Atomic(foo_t)* [for a standard atomic_xxx()], clang rejects
>> foo_t* arguments.
> It's not clear to me that C actually requires it to be rejected, or if
> it's just undefined (in which case GCC's decision to accept it and do
> the obvious thing is OK).
Except in pedantic mode. I remember there was a move to actually permit
this in C++:
This seems obviously right to me...
Andrew Haley (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
More information about the Gcc-help