[cfe-dev] __sync_* builtins

Joerg Sonnenberger via cfe-dev cfe-dev at lists.llvm.org
Wed Feb 22 06:55:26 PST 2017


On Wed, Feb 22, 2017 at 12:22:09PM +0000, David Chisnall via cfe-dev wrote:
> For the __atomic functions, we worked around this bug using #pragma
> redefine_extname.  This unfortunately leaves us with code that doesn’t
> compile with gcc (because redefine_extname is a weird Solarisism and
> gcc only supports it on Solaris).

Just call it sync_foo on the C level and give it a different asm name.
Works perfectly fine with both GCC and Clang.

Joerg



More information about the cfe-dev mailing list