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: 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.


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