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: dewar at gnat dot com (Robert Dewar)
- To: kenner at vlsi1 dot ultra dot nyu dot edu, rth at redhat dot com
- Cc: aoliva at redhat dot com, gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Sat, 19 Apr 2003 22:26:41 -0400 (EDT)
- Subject: Re: DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT
> You might. It depends on what you're doing with that object.
> Perhaps it's been put into a special section and so smooshed
> into an array created at link time. Indeed, that's *exactly*
> the case that caused us to respect USER_ALIGN in varasm.c at
> all costs.
In that case, you would specify an explicit alignment *for the
object*, which a compiler would take as a clear indication that
the alignment should not be increased. This shows why it is important
to know if the alignment from an object was explicitly specified
for the object.
We specify the alignment of a type to determine the treatment within
composites, but we do not necessarily expect that to not be increased
for stand alone objects.