This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Arrays and Alignment
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- Cc: gcc at gcc dot gnu dot org
- Date: 23 Sep 2003 21:55:09 +0200
- Subject: Re: Arrays and Alignment
- Organization: Integrable Solutions
- References: <10309231950.AA28015@vlsi1.ultra.nyu.edu>
kenner@vlsi1.ultra.nyu.edu (Richard Kenner) writes:
| | > typedef unsigned char achar __attribute__ ((__aligned__(32)));
| | > achar a[2];
|
| | > __alignof__(a[1]):1
|
| I think this is wrong: it should be 32.
seconded.
| Note however that an object may be defined to have a user-supplied
| alignment without implying that its type has the same alignment.
|
| I remember Kenner argued for that distinction (a while ago).
|
| Yes, but not in this direction!
I stand corrected.
| An object cannot be *less* aligned than
| it's type. I argued for being able to represent an object that was *more*
| aligned than its type.
Thanks for the precision.
-- Gaby