This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT
- From: Richard Henderson <rth at redhat dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Thu, 17 Apr 2003 20:04:57 -0700
- Subject: Re: DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT
- References: <10304180120.AA15817@vlsi1.ultra.nyu.edu>
On Thu, Apr 17, 2003 at 09:20:24PM -0400, Richard Kenner wrote:
> No, it's being overloaded for two *other* meanings:
>
> (1) The user really did set the alignment of the object.
> (2) The user really did set the alignment of the object's *type*.
I see the two as equivalent.
> Yes, but there's a fundamental ambiguity here. If the user says he
> wants an object aligned at a 4-byte boundary, is it an error to align
> it to a page boundary?
If aligning to a page boundary has the effect of inserting
padding that a 4-byte boundary wouldn't, yes. I.e. the compiler
*shouldn't* emit ".p2align 13" in this situation.
r~