This is the mail archive of the gcc@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: 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.
 > 
 > 
 > Is __alignof__( ::java::lang::Object ) the same under 3.4 and 4.0 in the
 > first place?

Yes, 4 in both cases.

 > My fixes were to parse more attributes, not less. So this has to be
 > unrelated to my patches. I suggest you file a bugreport in Bugzilla, and
 > mark it as ABI breaking. It should get fixed before 4.0 gets out.

OK, I'll file a bug report.

Andrew.


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