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


Neil Booth <neil@daikokuya.co.uk> writes:

> Gabriel Dos Reis wrote:-
>
>> | > Thanks for the instantaneous reply :-)
>> | > 
>> | > I must confess, however, that I don't understand what you mean
>> | > by "both". Do you mean (1) array alignment and (2) array element
>> | 
>> | He means, I think, that &a[n] == &a[0] + n * sizeof (a[0]) is an
>> | inescapable fact of life.
>> 
>> Certainly, but alignment and sizeof are not unrelated attributes.
>
> That may be true, but I stand by my statement, which I believe you
> agree with, and I interpret that as what Andreas meant.

Yes, this is what I meant.  The only option we have is to increase sizeof,
as Gaby wrote.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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