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

--- Comment #13 from Richard Biener <rguenth at gcc dot gnu.org> ---
Just to mention the testcase fails in the same way if you build and run it with
GCC 7 and libstdc++ from GCC 7 when that was configured with the gcc-4
compatible ABI by default.  Just in case that wasn't obvious...

Dropping the

// Determines the version of ios_base::failure thrown by __throw_ios_failure.
// If !_GLIBCXX_USE_DUAL_ABI this will get undefined automatically.
#define _GLIBCXX_USE_CXX11_ABI 1

from src/c++11/ios.cc probably makes that more "consistent", matching the
default ABI.  The PR66145 changed that from an unconditional #define to
0 to an unconditional #define to 1.  While, as the comment now says, a build
without the dual-abi will use the old behavior switching the ABI default
does not influence the behavior.

I realize PR66145 is exactly about "fixing" the case of the user not using
the default ABI but now we have still exactly the same situation when the user
does

#define _GLIBCXX_USE_CXX11_ABI 0

with a compiler defaulted to the new ABI.

So IMHO the original change was totally pointless... :/

I'm probably going to locally patch it to be consistent with the default ABI
choice - that at least keeps programs working that do not explicitely choose
the ABI via #define _GLIBCXX_USE_CXX11_ABI and is consistent with the system
integrators choice of the default ABI to keep compatibility to older GCC
versions.

Reply via email to