On Tue, Feb 15, 2022 at 04:05:11PM -0600, Segher Boessenkool wrote: > On all older compilers these macros will not be defined, but the types > often are. If you are willing to not support older compilers properly > anyway, you could just *always* use the types, which will work with most > very old compilers as well (and the approach using these propesed > predefines will *not*!)
The types are not defined on older systems. Both __ibm128 (ibm128_float_type_node) and __float128 (ieee128_float_type_node) are only defined if TARGET_FLOAT128_TYPE is true. TARGET_FLOAT128_TYPE is only true if both TARGET_FLOAT128_ENABLE_TYPE and TARGET_VSX are true. TARGET_FLOAT128_ENABLE_TYPE is only true on linux64 systems. Now, the code to set __SIZEOF_IBM128__ and __SIZEOF_FLOAT128__ is in the code that also defines __FLOAT128__. This code checks whether the __float128 and __ibm128 keywords are allowed. These keywords are only set if TARGET_FLOAT128_TYPE is true, and if the user did not use the -mno-float128 option. In the GCC 7 time frame, we did not set this by default, but in the modern compilers, it is always set by default on Linux 64-bit systems. -- Michael Meissner, IBM PO Box 98, Ayer, Massachusetts, USA, 01432 email: meiss...@linux.ibm.com