Fw: GCC interpretation of C11 atomics (DR 459)

Ruslan Nikolaev via gcc gcc@gcc.gnu.org
Mon Feb 26 08:43:00 GMT 2018


> I'd say the main issue is that libatomic is not guaranteed to work like that.


> Today it relies on IFUNC for redirection, so you may (and not "will") get the
> desired behavior on Glibc (implying Linux), not on other OSes, and neither on
> Linux with non-GNU libc (nor on bare metal, for that matter).
I think, in case if IFUNC is not available (i.e., outside glibc), redirection is still possible by introducing a regular function pointer there. Yes, it is an extra cost but better than nothing (+ consistent behavior on all platforms), probably will not add too much anyway because there is already a performance hit by going to libatomic.

   



More information about the Gcc mailing list