On Mon, Nov 20, 2023 at 07:49:40AM +0000, Richard Biener wrote: > Of course the other obvious alternative would be to parse > stdc_leading_zeros and friends directly, and not go through macros > and builtins.
The stdc_* names are not keywords and without including stdbit.h I'm not sure it is ok to change their behavior. That said, the last patch in the series implements 3 of the 14 type-generic macros as builtins, so one can then #if __glibc_has_builtin (__builtin_stdc_bit_width) #define stdc_bit_width(value) __builtin_stdc_bit_width (value) #else ... #endif and be done with that. If there is an agreement we should do that for all 14 rather than just those 3 + the 2 ugly hacks (__builtin_c{l,t}zg with 0ULL second argument and __builtin_bit_complement), I can change the patch to implement all 14 too (again, in the FE in the same spot, so there isn't actually any builtins.def for it and it doesn't affect the middle-end at all). Note, __builtin_bit_complement doesn't affect the middle-end at all either. Jakub