This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Use __builtin_tgmath in tgmath.h with GCC 8 (bug 21660) [committed]


On 11/17/2017 02:00 PM, Szabolcs Nagy wrote:
On 17/11/17 12:50, Florian Weimer wrote:
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.


in this case prereq(8,1) would work

But this would mean that we do near-zero pre-release testing of this glibc feature, which seems very undesirable to me.

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]