Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!iuvax!rutgers!rochester!pt.cs.cmu.edu!sei!sei.cmu.edu!firth From: firth@sei.cmu.edu (Robert Firth) Newsgroups: comp.arch Subject: Re: Endian wars Message-ID: <8496@aw.sei.cmu.edu> Date: 9 Feb 89 13:13:35 GMT References: <6133@columbia.edu> <3300050@m.cs.uiuc.edu> <8480@aw.sei.cmu.edu> <24384@amdcad.AMD.COM> Sender: netnews@sei.cmu.edu Reply-To: firth@bd.sei.cmu.edu (Robert Firth) Organization: Carnegie-Mellon University, SEI, Pgh, Pa Lines: 20 In article <8480@aw.sei.cmu.edu> firth@bd.sei.cmu.edu (Robert Firth) writes: | Could someone inform me whether the current C standard has fixed this? | The simplest answer I guess is to rule that the address of array[upb+1] | must always be legal; in practice this means the implementation has to | leave dead space at the end of each memory segment. In article <24384@amdcad.AMD.COM> tim@amd.com (Tim Olson) writes: >That is exactly what is done in the current proposed ANSI C standard; >the address is legal to compute, although dereferencing the address is >undefined. Only a single byte of "dead space" is required for this. Thanks, Tim, and others who mailed me. There is a copy of the latest ANSI C in this building, but it seems to have wandered off, so I can't look this up for myself readily. However, is only a single byte required? Suppose you have an array of a struct; is it legal to compute the address of array[upb+1].component? If so, then you really do need to allocate a complete dead array element.