Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!sdd.hp.com!hp-pcd!hpfcso!mjs From: mjs@hpfcso.HP.COM (Marc Sabatella) Newsgroups: comp.sys.hp Subject: Re: Optimizer bug in cc(1) on HP9000/835 Message-ID: <7370212@hpfcso.HP.COM> Date: 21 Sep 90 19:28:48 GMT References: <1990Sep19.210628.10847@nmt.edu> Organization: Hewlett-Packard, Fort Collins, CO, USA Lines: 22 >The original problem was posted against series 800. It's unlikely that >any series 800 optimizer bug would be a bug in the series 300 optimizer >since they share no code whatsoever. As an aside, the original poster said that the dereference of NULL of was not the issue. Dereferencing NULL is in fact undefined (illegal?) in both K&R and ANSI, so it is not completely surprising you didn't get whatever results you expected, even though HP-UX does indeed try to define the result of NULL pointer dereferences as either 0 or a segmentation violation. Of course, even if one were to classify this as an error in the program, one would like better error recovery :-) Coincidentally, a similar construct broke the Series 300 code generator, too, but that was caught in time. In that case, it really was the explicit dereference of NULL that caught the code generator by surprise. -------------- Marc Sabatella (marc@hpmonk.fc.hp.com) Disclaimers: 2 + 2 = 3, for suitably small values of 2 Bill and Dave may not always agree with me