For compatibility with the Solaris and Tru64 UNIX system headers, GCC
#pragma directives which change the name used in
assembly for a given declaration.
#pragma extern_prefix is only
available on platforms whose system headers need it. To get this effect
on all platforms supported by GCC, use the asm labels extension (see Asm Labels).
__PRAGMA_REDEFINE_EXTNAMEwill be defined if this pragma is available (currently on all platforms).
extern_prefixpragma whose argument is an empty string. The preprocessor macro
__PRAGMA_EXTERN_PREFIXwill be defined if this pragma is available (currently only on Tru64 UNIX).
These pragmas and the asm labels extension interact in a complicated manner. Here are some corner cases you may want to be aware of.
#pragma redefine_extnameis always the C-language name.
#pragma extern_prefixis in effect, and a declaration occurs with an asm label attached, the prefix is silently ignored for that declaration.
#pragma redefine_extnameapply to the same declaration, whichever triggered first wins, and a warning issues if they contradict each other. (We would like to have
#pragma redefine_extnamealways win, for consistency with asm labels, but if
#pragma extern_prefixtriggers first we have no way of knowing that that happened.)