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

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Michael Meissner from comment #4)
> The macro __LONG_DOUBLE_IEEE128__ is defined if long double uses the IEEE
> 128-bit format, and __LONG_DOUBLE_IBM128__ is defined if long double uses
> the IBM 128-bit format that uses a pair of doubles.

Yes, and libstdc++ relies on those heavily. But they isn't useful here, because
those macros say what the *active* long double format is. The point of the
_GLIBCXX_LONG_DOUBLE_ALT128_COMPAT macro is to say that the library needs to
support two long double formats at the same time. That is independent of which
one happens to be active during a given compilation.

There are files in libstdc++ which use both __ibm128 and __ieee128 in the same
translation unit, but we need to not do that when __ieee128 is disabled by an
option like -mlong-double-64


(In reply to Michael Meissner from comment #4)
> Note, that the minimum CPU support for little endian is power8.  So, using
> -mcpu=power6 or -mcpu=power7 on a LE system is not supported.

Ah! OK, so maybe this isn't an issue at all? The Compiler Explorer link in
comment 0 is using power64le for both examples. If I switch the selected
compilers to power64 (i.e. BE) there are no errors when using -mcpu=power6 or
-mlong-double-64

But maybe that's because the compiler explorer VM for power64 BE has an old
glibc without __float128 support in libm, and so in theory somebody could be
running BE on a new glibc and need ALT128_COMPAT.

Reply via email to