[Bug c++/53673] Add magic weak symbol to indicate C++ standard setting (C++03, C++11 etc) to help debug ABI problems
s_gccbugzilla at nedprod dot com
gcc-bugzilla@gcc.gnu.org
Fri Jun 15 15:14:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53673
--- Comment #3 from Niall Douglas <s_gccbugzilla at nedprod dot com> 2012-06-15 15:13:37 UTC ---
(In reply to comment #1)
> There's no point differentiating the gnu variants, they don't have any ABI
> impact.
They don't have any ABI impact that we know of at the present time in this
present generation of GCCs. As a debug aid that's likely to be there from now
on and forever, who's to say about the future. Better to cover all bases now
I'd say, just in case.
> This could (and probably should) be done in the library because the output of
> G++ is ABI compatible, it's only standard library components that are not.
There are no shortage of third party libraries which enable special new stuff
when compiled with GNU additions turned on.
Also, the ISO C++ standard is quite clear that ABI between C++03 and C++11
compiled code is not guaranteed in the case where C++11 libraries/shared
objects are linked into a C++03 compiled program. Indeed, really an error ought
to be thrown if this happens for safety's sake, a warning as a minimum.
Niall
More information about the Gcc-bugs
mailing list