DATA_ALIGNMENT vs. DECL_USER_ALIGNMENT
Richard Kenner
kenner@vlsi1.ultra.nyu.edu
Thu Apr 10 21:31:00 GMT 2003
Yes, the type can have greater alignment. However type normally does
imply a minimum alignment and minimum size. Specifying user alignment
for a well-defined type seems redundant.
You lost me.
If I have a record of two 16-bit fields, the natural alignment of that type
is 16 bits. However, the user is allowed to specify an alignment of 32
bits for the type.
I'm not sure what your second sentence means, but it is indeed true
that the compiler cannot change the alignment of a type since it
bounds it in both directions: it gives the minimum alignment that an
object of that type created by the compiler is guaranteed to have, but
it also gives the *maximum* alignment that the compiler is allowed to assume
that a user-created object of that type will have.
More information about the Gcc
mailing list