This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Arrays and Alignment


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]