possible structure layout bug
Andrew Haley
aph@redhat.com
Wed Jun 9 20:48:00 GMT 2004
Richard Henderson writes:
> 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.
Yeah, but that just raises a new question: what defines a class with a
SIMD type member as non-POD? Clearly the C++ Standard makes no such
ruling, so why do we? Or is this just an accident?
Andrew.
More information about the Gcc
mailing list