With powerpc-eabi-gcc, I noticed that there's been a small
change between gcc-3.4 and gcc-4.1 in how automatic char arrays
are allocated.
In gcc-3.4, char arrays are aligned on word boundaries.
In gcc-4.1, they are aligned on byte boundaries.
For example:
void foo() {
char a[31];
char b[31];
...
On gcc-3.4, "b" would be allocated at a+32; in gcc-4.1, it's a+31.
I can't find a bug report which mentions this, nor
do I see anything in the code either in function.c or
in the LOCAL_ALIGNMENT macro in rs6000.h which would
have this effect.
Was this a deliberate change? If so, where?
The PPC EABI says that arrays are aligned on the boundary
of the type, which suggests that this was a bug fix. But
unaligned char arrays make strcpy much slower.
--
Michael Eager [EMAIL PROTECTED]
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077