This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ABI Issues: C++ PATCH: PR 12053


On Wed, 2003-09-03 at 15:58, Joe Buck wrote:
> On Wed, Sep 03, 2003 at 03:41:25PM -0700, Mark Mitchell wrote:
> > 
> > I've committed this patch on the mainline to fix c++/12053.  That PR
> > refers to a structure whose sized changed from 3.2 to 3.3 when using
> > -fabi-version=1.  The old size happens to be the correct (i.e.,
> > ABI-specified) size; the new size was wrong, both with respect to the
> > ABI specification and with respect to 3.2 ABI compatibility.
> > 
> > The problem occurred when you have a class who last field was a
> > bitfield that did not end on a byte boundard, and the class had
> > virtual bases.
> > 
> > In additional to the usual DejaGNU testing on i686-pc-linux-gnu, I ran
> > the CodeSourcery C++ ABI testsuite on i686-pc-linux-gnu, and verified
> > no regressions with -fabi-version=0.
> > 
> > I've also committed the patch to the branch, which is potentially
> > controversial in that it changes the C++ ABI between GCC 3.3.1 and GCC
> > 3.3.2.  However, it restores compatibility with GCC 3.2, which is the
> > point of -fabi-version=1.
> > 
> > I have two questions:
> > 
> > 1) Anyone object to putting this on the 3.3 branch?
> 
> Is 3.3 otherwise binary-compatible with 3.2 by default?  If so, it seems
> it should go in.  If not, I am uncertain.

As far as I know, it is.

> In any case, we should make sure that -Wabi issues a warning for this
> case.  The goal for -Wabi should be that if we run it using the latest
> available GCC and it is silent, we have ABI compatibility with everything
> from 3.2 on (barring issues with libraries).

There's no place to put such a warning -- 3.3.2 *will* be compatible
with 3.2 (now that this fix is in), so it can't warn.  And 3.3.1 is
already in the can, so it can't warn either.

-- 
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]