This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch to generate align 0 for packed attributes
- To: Chandra Chavva <cchavva at cygnus dot com>
- Subject: Re: patch to generate align 0 for packed attributes
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Thu, 27 Jul 2000 11:48:15 -0600
- cc: gcc-patches at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
In message <Pine.SOL.3.91.1000726120707.23599I-100000@emperor.cygnus.com>you
write:
> Hi,
>
> If a member of a struct has packed attribute and initialized, the compiler
> does not correct alignment for such variables.
>
> Here is the testcase which fails for mips architecture,
My first question, I'm guessing that the belief is that the MIPS assembler
is automatically aligning data to their natural boundary?
If so, how does an .align 0 stop that? That seems like awful strange behavior
from an assembler.
Second, do all MIPS assemblers do this? If not, then we need to test for
it using autoconf.
Third, you didn't include any documentation on the new target macros.
Fourth, I would be very leery of this code since it appears to be laying
out bitfields within structures. If you do it wrong, you'll break ABI
compatibility.
jeff