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: aoliva at redhat dot com
- Cc: gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Mon, 21 Apr 03 12:51:12 EDT
- Subject: Re: DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT
So if you turn:
T i __attribute__((align(2)));
T j __attribute__((align(2)));
into
typedef T T2 __attribute__((align(2)));
T2 i, j;
you say we could get different code?
I say so, yes.
And the reason is as I said: you specify alignment for a type both for
interface and efficiency reasons, but for an object only for the latter.
So there is a difference in meaning between these two constructs.