Arrays and Alignment

Gabriel Dos Reis gdr@integrable-solutions.net
Tue Sep 23 22:26:00 GMT 2003


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,

More precisely, I do not agree with the statement that one can't
have both.  But I agree with the above relation.

| and I interpret that as what Andreas meant.


-- Gaby



More information about the Gcc mailing list