https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99708

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The __SIZEOF_*__ macros are widely used to detect both if a type can be used
and what sizeof (the_type) is when it needs to be checked in preprocessor
conditionals, including hundreds of times in GCC testsuite.
It is something supported by multiple compilers (GCC, clang, ICC at least).
Having to remember magic macros which are different on each arch and in each
compiler is much more complicated.
The topic this came up on is libstdc++ headers which in ext/numeric_traits.h
wants to provide ppc64le compatibility and right now assumes that if
__LONG_DOUBLE_IEEE128__ is defined then __ibm128 type can be used and
__LONG_DOUBLE_IBM128__ is defined then __ieee128 type can be used.
Apparently that is not the case at least for clang which didn't have __ieee128
support until very recently and __float128 support needs a non-default option
passed to the compiler.
Which was why I suggested to guard those by
# elif defined __LONG_DOUBLE_IBM128__ && __SIZEOF_FLOAT128__ == 16
or something similar, but it doesn't work for GCC.

Reply via email to