[Bug libstdc++/66145] [5/6/7 Regression] std::ios_base::failure objects thrown from libstdc++.so use old ABI

boris at kolpackov dot net gcc-bugzilla@gcc.gnu.org
Thu Jul 21 14:15:00 GMT 2016


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

--- Comment #24 from Boris Kolpackov <boris at kolpackov dot net> ---
Some more speculation/crazy ideas about the potential fix:

If just throwing the new version and forgetting about the old one is an option,
then perhaps we could "de-inherit" old from std::exception and inherit new from
this modified variant of old (in addition to system_error). This will give us:

1. Old code will be able to catch it as old ios::failure.

2. Old code will be able to catch it as std::exception (via the new version's
inheritance chain).

3. typeid() will even report it as ios::failure (unlike in my previous
suggestion).

Regarding how to have two version at the same time, I may be wrong, but I
thought inline namespaces were used to implement this dual ABI.


More information about the Gcc-bugs mailing list