4.0 regression: g++ class layout on PPC32 has changed

Andrew Pinski pinskia@physics.uc.edu
Mon Apr 4 18:33:00 GMT 2005


On Apr 4, 2005, at 1:01 PM, Andrew Haley wrote:

> Giovanni Bajo writes:
>> Is __alignof__( ::java::lang::Object ) the same under 3.4 and 4.0 in 
>> the
>> first place?
>
> Yes, 4 in both cases.


And here is the most reduced testcase (and it shows that the C and C++
front-ends don't agree any more which is bad):

#include <stdio.h>
typedef struct Parent
{
   long long m;
   int *scratch;
   void * __attribute__((aligned(8))) this$0;
}Parent;
int main (int argc, char **argv)
{
   printf ("%d\n", sizeof(Parent));

   return 0;
}

This is also seen on i686-pc-linux-gnu with the same results as on
ppc-darwin.  This has been broken since 20040909.

Thanks,
Andrew Pinski



More information about the Gcc mailing list