This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: ABI Issues: C++ PATCH: PR 12053
- From: Matt Austern <austern at apple dot com>
- To: Joe Buck <jbuck at synopsys dot com>
- Cc: Mike Stump <mrs at apple dot com>, Mark Mitchell <mark at codesourcery dot com>, Jason Merrill <jason at redhat dot com>, gcc at gcc dot gnu dot org, nathan at codesourcery dot com, phil at codesourcery dot com, bkoz at redhat dot com
- Date: Thu, 4 Sep 2003 22:03:05 -0700
- Subject: Re: ABI Issues: C++ PATCH: PR 12053
On Thursday, September 4, 2003, at 04:54 PM, Joe Buck wrote:
On Thu, Sep 04, 2003 at 04:45:25PM -0700, Mike Stump wrote:
Odd, you only test what people don't use, and don't test what people
do
use. Maybe that is backward. Imagined compatibility isn't more
important than real compatibility.
That's why some of us pushed for -Wabi, with the goal that the compiler
would warn about all constructs known to cause ABI compatibility
problems.
Since these problems are discovered as time goes on, the user would
have
to run a -Wabi analysis with the newest available compiler.
At least this allows users to determine whether they are likely to run
into trouble. In practice, seeing that almost all the problems found
so
far relate to bitfields and inheritance, I would avoid giving the
compiler
any chance to mess up here, by avoiding leaving any sub-byte padding
(or,
to be safer, sub-word padding) at the end of a class that is likely to
be
derived from.
That reminds me, I've found another bug that has to do with
bitfields---but bitfields and unions this time, not bitfields and
inheritance. I've finally gotten around to filing it:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12176
I don't think this relates to any subtleties in defining or
implementing the new C++ ABI, I think it's just a garden variety bug.
(And one that seems to have been there since roughly forever, and that
nobody has noticed until now because it involves a feature combination
that nobody uses or cares about.) But fixing could reasonable be
considered to be an ABI-breaking change, because it'll change the sizes
of some objects. Please read the bug description if you care about
this sort of thing. Who knows, maybe you can show me that I'm wrong
and that it isn't a bug after all. That would be nice!
Unless anyone tells me in the next day or so that they desperately want
this bug, I'm going to assign it to myself.
--Matt