This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: 4.0 regression: g++ class layout on PPC32 has changed
Giovanni Bajo writes:
> Andrew Haley <aph@redhat.com> wrote:
>
> > public:
> > long long __attribute__((aligned(__alignof__( ::java::lang::Object ))))
> l;
>
> I don't recall the exact details, but I have fixed a couple of bugs about
> the use of __alignof__ and attribute aligned on members of classes (maybe
> templates only?). Are you positive this attribute declaration *does* have an
> effect at all in 3.4?
It seems to be the other way around.
The attribute declaration does have an effect in 3.4 -- the offset
changes from 52 to 56 -- but it does not have any effect in 4.0, and
this is what breaks my code.
Andrew.