This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: possible structure layout bug
- From: Stephen Kennedy <Stephen dot Kennedy at havok dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 15 Jun 2004 14:21:09 +0100
- Subject: Re: possible structure layout bug
- Organization: Havok
- References: <1086801744.3034.24.camel@stag.telekinesys> <20040609194422.GA13059@redhat.com>
- Reply-to: Stephen dot Kennedy at havok dot com
On Wed, 2004-06-09 at 20:44, Richard Henderson wrote:
> On Wed, Jun 09, 2004 at 06:22:24PM +0100, Stephen Kennedy wrote:
> > Normally, compilers place members from derived classes starting at
> > sizeof(base), but gcc breaks this rule if the class contains a simd type
> > and places the derived member in the padding of the base class.
>
> Has nothing to do with simd or not. Has everything to do
> with POD or non-POD type.
Ok, so if I have this correct, POD members padding may not be reused by
derived classes but non-POD classes may have their padding reused.
Why then is __m128 not considered a POD type? It is most natural to
think of machine native register types as POD.
Stephen.
--
Stephen Kennedy stephen.kennedy@havok.com http://www.havok.com/
Game Developer Frontline Award Winner 2002 & 2003
Computer Graphics World 2003 Innovation Award Winner