This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: geoffk at geoffk dot org
- Cc: gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Thu, 10 Apr 03 17:05:30 EDT
- Subject: Re: DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT
Is it not true in Ada that if something is a particular type, then
it has the properties (including alignment) of that type?
The other issue is that DECL_USER_ALIGN is supposed to indicate if an
alignment was specified *for a decl*. If you want to know if an
alignment is specified for *the type of a decl*, you check
TYPE_USER_ALIGN (TREE_TYPE (decl)). Some code may wish to do
something if *either* alignment was user-specified, but then it can
check *both* flags.