[Bug target/99708] __SIZEOF_FLOAT128__ not defined on powerpc64le-linux

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Mar 24 14:50:40 GMT 2021


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

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Segher Boessenkool from comment #3)
> In an ideal world the user can just assume those types exist always.  In a
> less ideal world, use autoconf?  You have to anyway, if you want to support
> older compilers at all.

Libstdc++ headers cannot use autoconf to check for features in a compiler that
users run on their own machine.

Libstdc++ needs to know whether types such as __float128 and __ibm128 are
defined **by the compiler that happens to be including the headers**. That
might be GCC (in which case we have complete knowledge about what types it
defines) or it could be an arbitrary version of clang. For the latter case we
cannot run autoconf to probe the user's clang version because libstdc++ has
already been installed. We need clang to expose macros that say which types are
defined, and obviously it would be preferable for gcc and clang to agree on
which macros are used for which types.

Arguably a __SIZEOF_xxx__ macro isn't a very sensible macro for types where the
type has a guaranteed size, but we need *something* that says the type exists.
Since all other targets already use __SIZEOF_xxx__ to say that the type exists,
it would be consistent and helpful for powerpc to do the same.


More information about the Gcc-bugs mailing list