This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++98/C++11 ABI compatibility for gcc-4.7
- From: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- To: James Y Knight <foom at fuhm dot net>
- Cc: jyasskin at googlers dot com, gcc at gcc dot gnu dot org
- Date: Thu, 14 Jun 2012 14:37:38 +0100
- Subject: Re: C++98/C++11 ABI compatibility for gcc-4.7
- References: <684e2daa82dfe58f3c0ca7898a646503.squirrel@fuhm.net>
On 31 May 2012 22:35, James Y Knight wrote:
> You've missed at least one ABI incompatibility in GCC 4.7 and later, as
> demonstrated in real life by (at least) libboost_python, and distilled
> into this test case.
>
> At least these bug reports are probably caused by this ABI incompatibility:
> https://svn.boost.org/trac/boost/ticket/6919
That appears to be a strict aliasing violation. Boost.Python has lots
of warnings about them when built.
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53455
> https://svn.boost.org/trac/boost/ticket/6895
>
> As I've said before, I really wish GCC devs would take the ABI
> incompatibility problem more seriously.
Those two reports and your test case are the same as
http://gcc.gnu.org/PR53646 and http://gcc.gnu.org/PR53657 and should
be fixable.
It might also be the cause of http://gcc.gnu.org/PR53490 (I couldn't
reproduce that one so I'm not sure.)
It seems to be an inadvertent incompatibility caused by the
interaction of a libstdc++ workaround for a bug and g++ behaviour that
may not have been known to the libstdc++ devs, so not something that
could have been prevented by making it a linker error, because noone
knew it was even broken. Testing and reporting bugs and analysing the
problem should lead to it being fixed. I think the problem was GCC
devs not knowing the problem existed, rather than not taking it
seriously.