Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!ima!ISM780!darryl From: darryl@ISM780.UUCP Newsgroups: net.lang.c Subject: Re: Re: Converting FORTRAN to C Message-ID: <21@ISM780.UUCP> Date: Mon, 14-Jan-85 01:05:50 EST Article-I.D.: ISM780.21 Posted: Mon Jan 14 01:05:50 1985 Date-Received: Tue, 15-Jan-85 02:12:35 EST Lines: 20 Nf-ID: #R:ukma:-43100:ISM780:12500031:000:1004 Nf-From: ISM780!darryl Jan 6 23:02:00 1985 >>Although &p[ARRAYSIZE] may not dereference an invalid location, it's value >>may not have much meaning, either. For example, if you were running on >>an 80*86 chip, and p was an array filling a segment, then &p[ARRAYSIZE] >>has a value of 0! >A wise compiler writer would never allow the allocation of the last byte >of a segment. Comparisons to the address one byte beyond the end of an >array are ubiquitous in C code, and it would verge upon insanity to >try to outlaw them. A wise user would do well to stay out of the corners of the language, if s/he were to write portable code. As we have all seen in the annals of net.lang.*, every compiler seems to have its foibles. This case in particular is not under the complete control of the compiler implementor; a cross compiler has little control over the target environment, where malloc() may not be so wise. --Darryl Richman, INTERACTIVE Systems Inc. ...!cca!ima!ism780!darryl The views expressed above are my opinions only.