From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC,T_FILL_THIS_FORM_SHORT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c9c309a1859318a1 X-Google-Attributes: gid103376,public X-Google-Thread: 1149ec,2f3c93c30c7261a6 X-Google-Attributes: gid1149ec,public From: "Clive D.W. Feather" Subject: Re: HELP ! need to insert value in array !! Date: 1997/07/07 Message-ID: #1/1 X-Deja-AN: 255302750 Distribution: world X-NNTP-Posting-Host: ball120.demon.net [193.195.225.120] References: <33A9C27C.22F7@post4.tele.dk> <5oci49$97g@crl.crl.com> <866920621snz@genesis.demon.co.uk> <5p0v7l$9uc@nntp.seflin.org> <33b64c2f.43589878@nntp.ix.netcom.com> <33b67602.54296884@nntp.ix.netcom.com> <5phtjb$dej$1@goanna.cs.rmit.edu.au> Organization: Clive's laptop (part of Demon Internet Ltd.) Reply-To: clive@demon.net Newsgroups: comp.std.c,comp.lang.ada Date: 1997-07-07T00:00:00+00:00 List-Id: In article <5phtjb$dej$1@goanna.cs.rmit.edu.au>, "Richard A. O'Keefe" 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. 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. | Fax: +44 181 371 1037 | | Written on my laptop; please observe the Reply-To address |