From: "Clive D.W. Feather" <clive@on-the-train.demon.co.uk>
Subject: Re: HELP ! need to insert value in array !!
Date: 1997/07/07
Date: 1997-07-07T00:00:00+00:00 [thread overview]
Message-ID: <UNqwKCA5oSwzEwX0@on-the-train.demon.co.uk> (raw)
In-Reply-To: 5phtjb$dej$1@goanna.cs.rmit.edu.au
In article <5phtjb$dej$1@goanna.cs.rmit.edu.au>, "Richard A. O'Keefe"
<ok@goanna.cs.rmit.edu.au> writes
>>Also, you did not answer my point about alignment. Suppose the array
>>element type is one whose size is not a multiple of its alignment.
>There is no such animal in C. The size of every object *must* be a
>multiple of its alignment.
Alignment of a type is *defined* to be the number that addresses of that
object must be a multiple of. Since array elements are exactly sizeof(T)
apart, it is trivial to see that sizeof(T) must be a multiple of the
alignment of T.
WG14 have confirmed that structure/union elements need not have the same
alignment as raw objects of a type, and different structures can put
different alignments on the same type.
>>Or are you saying that the ANSI standard requires that the size be a
>>multiple of the required alignment. If so, please quote chapter and
>>verse.
Definition of alignment is 3.2, IIRC. 3.<small integer> anyway.
That's ISO 3 and current-ANSI 3, not withdrawn-ANSI 3.
--
Clive D.W. Feather | Director of Software Development | Home email:
Tel: +44 181 371 1138 | Demon Internet Ltd. | <clive@davros.org>
Fax: +44 181 371 1037 | <clive@demon.net> |
Written on my laptop; please observe the Reply-To address |
next prev parent reply other threads:[~1997-07-07 0:00 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <33A9C27C.22F7@post4.tele.dk>
[not found] ` <5oci49$97g@crl.crl.com>
[not found] ` <866920621snz@genesis.demon.co.uk>
1997-06-27 0:00 ` HELP ! need to insert value in array !! Ralph Silverman
1997-06-28 0:00 ` Lawrence Kirby
[not found] ` <dewar.867554609@merv>
1997-06-29 0:00 ` Mike Rubenstein
1997-06-29 0:00 ` Robert Dewar
1997-06-29 0:00 ` Mike Rubenstein
1997-06-29 0:00 ` Robert Dewar
1997-06-29 0:00 ` Mike Rubenstein
1997-06-30 0:00 ` Ed Hook
1997-07-04 0:00 ` Richard A. O'Keefe
1997-07-07 0:00 ` Clive D.W. Feather [this message]
1997-07-01 0:00 ` Al Bowers
1997-07-01 0:00 ` Richard Kenner
1997-07-01 0:00 ` Robert Dewar
1997-07-02 0:00 ` Christian Froeschlin
1997-07-02 0:00 ` Robert Dewar
1997-07-04 0:00 ` Richard A. O'Keefe
1997-07-04 0:00 ` Robert Dewar
1997-07-04 0:00 ` Mike Rubenstein
1997-07-05 0:00 ` Robert Dewar
1997-07-05 0:00 ` Larry Kilgallen
1997-07-05 0:00 ` Mike Rubenstein
1997-07-05 0:00 ` Mike Rubenstein
1997-07-10 0:00 ` Alan Bowler
1997-07-07 0:00 ` Shmuel (Seymour J.) Metz
1997-07-07 0:00 ` Mark H. Wood
1997-07-09 0:00 ` Robert Dewar
1997-07-10 0:00 ` Lawrence Kirby
1997-07-08 0:00 ` Richard Kenner
1997-06-30 0:00 ` Samuel T. Harris
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox