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 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

(the strncpy diagnostic suppression pragma thing is more complicated
because some gcc-8.0 require it others fail with it, but in general
i prefer to be able to use the same gcc build for a while and also
for bisecting issues.)



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