[Bug c/68868] atomic_init emits an unnecessary fence
joseph at codesourcery dot com
gcc-bugzilla@gcc.gnu.org
Tue Dec 15 00:00:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68868
--- Comment #2 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
On Sat, 12 Dec 2015, msebor at gcc dot gnu.org wrote:
> + __typeof__ (VALUE) __tmp = (VALUE); \
Using typeof like this is incorrect; it results in multiple evaluation if
VALUE has a variably modified type. You have to use __auto_type in such a
case, as elsewhere in stdatomic.h.
More information about the Gcc-bugs
mailing list