This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/2352
- To: nobody at gcc dot gnu dot org
- Subject: Re: c++/2352
- From: lerdsuwa at gcc dot gnu dot org
- Date: 30 Mar 2001 08:56:00 -0000
- Cc: gcc-prs at gcc dot gnu dot org,
- Reply-To: lerdsuwa at gcc dot gnu dot org
The following reply was made to PR c++/2352; it has been noted by GNATS.
From: lerdsuwa@gcc.gnu.org
To: alan_gonzalez@iname.com, gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org
Cc:
Subject: Re: c++/2352
Date: 30 Mar 2001 08:47:24 -0000
Synopsis: inheritance on solaris
State-Changed-From-To: open->closed
State-Changed-By: lerdsuwa
State-Changed-When: Fri Mar 30 03:47:24 2001
State-Changed-Why:
Not a bug. It's up to the implementor to define how
each member in the class is aligned. The 'foo' base class
has size 1 (the standard specifies that the size of any class
must be nonzero). Aligning the foo base class with
mefoo member gives the size of mefoo 16.
The future gcc 3.0 has an optimization that gives the
size of foo and mefoo as 1 and 8, respectively. The
one-byte foo is optimized away inside class mefoo.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=2352&database=gcc