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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1149ec,2f3c93c30c7261a6,start X-Google-Attributes: gid1149ec,public X-Google-Thread: 103376,c9c309a1859318a1 X-Google-Attributes: gid103376,public From: ok@goanna.cs.rmit.edu.au (Richard A. O'Keefe) Subject: Re: HELP ! need to insert value in array !! Date: 1997/07/04 Message-ID: <5phtjb$dej$1@goanna.cs.rmit.edu.au>#1/1 X-Deja-AN: 254539682 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> Organization: Comp Sci, RMIT University, Melbourne, Australia. Newsgroups: comp.std.c,comp.lang.ada NNTP-Posting-User: ok Date: 1997-07-04T00:00:00+00:00 List-Id: dewar@merv.cs.nyu.edu (Robert Dewar) 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. >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. My second copy of the C standard seems to have walked off, perhaps to join its predecessor (wherever _that_ went). But surely this is one of the best known aspects of C? It hasn't changed since Classic C and is central to the way C pointer arithmetic works. (Casting (long*) to (char*) _is_ defined in standard C, by the way. That's again part of how pointer arithmetic is defined.) >It would be useful to know whether you are talking about things that "everyone >knows must be so", or things that are guaranteed to have the semantics you claim >from the standard. I have pruned the list of newsgroups and added comp.std.c, which was unaccountably missing. -- Four policemen playing jazz on an up escalator in the railway station. Richard A. O'Keefe; http://www.cs.rmit.edu.au/%7Eok; RMIT Comp.Sci.