Use __builtin_tgmath in tgmath.h with GCC 8 (bug 21660) [committed]
Florian Weimer
fweimer@redhat.com
Fri Nov 17 12:50:00 GMT 2017
On 11/17/2017 01:11 PM, Szabolcs Nagy wrote:
>> +/* There are two variant implementations of type-generic macros in
>> + this file: one for GCC 8 and later, using __builtin_tgmath and
>> + where each macro expands each of its arguments only once, and one
>> + for older GCC, using other compiler extensions but with macros
>> + expanding their arguments many times (so resulting in exponential
>> + blowup of the size of expansions when calls to such macros are
>> + nested inside arguments to such macros). */
>> +
>> +#define __HAVE_BUILTIN_TGMATH __GNUC_PREREQ (8, 0)
>
> this breaks the build on trunk toolchains that
> lack __builtin_tgmath
Short of getting GCC to adopt something similar to the Clang
__has_builtin pseudo-macro, I don't see any solution other that
requiring those who are affected by such issues to update.
Considering that this only affects an unreleased toolchain, I don't
think the upgrade requirement is unreasonably onerous.
Thanks,
Florian
More information about the Libc-alpha
mailing list