Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!aplcen!uakari.primate.wisc.edu!zaphod.mps.ohio-state.edu!tut.cis.ohio-state.edu!ucbvax!hplabs!hpda!hpcuhb!hpcllla!daryl From: daryl@hpcllla.HP.COM (Daryl Odnert) Newsgroups: comp.sys.hp Subject: Re: Array indexing problem (bug?) Message-ID: <3770039@hpcllla.HP.COM> Date: 26 Dec 89 18:24:04 GMT References: Organization: Hewlett-Packard Calif. Language Lab Lines: 20 In my previous response, I wrote: > You have indeed discovered a bug in the s800 C compiler. I will forward > the defect along the the C compiler team to investigate a fix. I guess I spoke a little bit too soon. It seems to be arguable whether or not pointer arithmetic outside the bounds of an array is guaranteed to work in K&R C. (The ANSI C standard, as Karl Pettis points out, is very clear on this matter. Its illegal.) The C compiler group is reluctant to fix this problem because it would mean generating extra instructions for every global array indexing operation. Please let us know how seriously this problem is impacting your ability to get your work done. If this is a major obstacle for you or others who are reading this discussion, it is possible that some kind of solution could be developed (e.g. a compiler option). Daryl Odnert daryl@hpda.hp.com Hewlett-Packard California Language Lab