> 1) your proposal would make gcc non-conforming to iso c unless it changes how > static const objects are emitted. I do not think, ISO C requires to put const objects to .rodata. And it is easily solved by not placing it there for _Atomic objects that cannot be safely loaded from read-only memory. > 2) the two implementations are not abi compatible, the choice is already > made, changing it is an abi break. Since current implementations redirects to libatomic anyway, almost nothing should break. The only case it will break -- if somebody erroneously used atomic_load for 128-bit type on read-only memory (which is, again, not guaranteed by the standard). In practice, this case almost non-existent. The worst that may happen -- you will a segfault right away. > 3) Torvald pointed out further considerations such as users expecting > lock-free atomic loads to be faster than stores. Is it even true? Is it faster to use some global lock (implemented through RMW) than a single RMW operation? If you use this global lock, you will not get loads faster than stores.
- Re: Fw: GCC interpretation of C11 atomics (DR 459) Alexander Monakov
- Re: Fw: GCC interpretation of C11 atomics (DR... Ruslan Nikolaev via gcc
- Re: Fw: GCC interpretation of C11 atomics (DR 459) Torvald Riegel
- Re: Fw: GCC interpretation of C11 atomics (DR... Ruslan Nikolaev via gcc
- Re: Fw: GCC interpretation of C11 atomics... Ruslan Nikolaev via gcc
- Re: Fw: GCC interpretation of C11 ato... Ramana Radhakrishnan
- Re: Fw: GCC interpretation of C11... Torvald Riegel
- Re: Fw: GCC interpretation of C11 ato... Torvald Riegel
- Re: Fw: GCC interpretation of C11... Ruslan Nikolaev via gcc
- Re: Fw: GCC interpretation of C11... Szabolcs Nagy
- Re: Fw: GCC interpretation of C11... Ruslan Nikolaev via gcc
- Re: Fw: GCC interpretation of C11... Torvald Riegel
- Re: Fw: GCC interpretation of C11... Ruslan Nikolaev via gcc
- Re: Fw: GCC interpretation of C11... Torvald Riegel
- Re: Fw: GCC interpretation of C11... Torvald Riegel
- Re: GCC interpretation of C11 ato... Simon Wright
- Re: GCC interpretation of C11 ato... Florian Weimer
- Re: GCC interpretation of C11 ato... Torvald Riegel
- Re: GCC interpretation of C11 ato... Ruslan Nikolaev via gcc
- Re: GCC interpretation of C11 ato... Torvald Riegel
- Re: GCC interpretation of C11 ato... Simon Wright