https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101127
--- Comment #1 from Iain Buclaw <ibuclaw at gdcproject dot org> ---
There's the language hook LANG_HOOKS_BUILTIN_FUNCTION_EXT_SCOPE, which seems to
do what we want on the surface, but then there's a question over whether this
is to be correct.
---
// static condition is false
static if (__traits(compiles, __builtin_ia32_pmulhrsw128))
pragma(msg, "Yes SSSE3 support");
else
{
short8 truc(short8 a, short8 b) @target("ssse3") // adds SSSE3 built-ins.
{
return __builtin_ia32_pmulhrsw128(a, b);
}
}
// static condition could be true, depending on order of evaluation.
static if (__traits(compiles, __builtin_ia32_pmaddubsw128))
pragma(msg, "Yes SSSE3 support");