Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site rlgvax.UUCP Path: utzoo!utcs!lsuc!pesnta!hplabs!hao!seismo!rlgvax!guy From: guy@rlgvax.UUCP (Guy Harris) Newsgroups: net.bugs.4bsd Subject: Re: bug in lint Message-ID: <497@rlgvax.UUCP> Date: Sat, 16-Feb-85 20:50:14 EST Article-I.D.: rlgvax.497 Posted: Sat Feb 16 20:50:14 1985 Date-Received: Mon, 18-Feb-85 08:46:23 EST References: <376@harvard.ARPA> <466@rlgvax.UUCP> <2305@randvax.UUCP> Distribution: net Organization: CCI Office Systems Group, Reston, VA Lines: 28 > I've seen LINT or PCC dump core on a number of occasions, although in > all cases the program being processed was incorrect and error messages > were printed before the dump occured. Fixing the error that caused > the error message(s) also eliminated the core dump. > On the other hand, the ``bad initialization'' error message is a good > example of the often cryptic (and in this case incorrect) error messages > that PCC emits. > In this particular case, I suspect that the problem lies in how the > grammar handles ``old-fashioned initializations''; I suspect you're right. The problem is that PCC gets confused, probably due to error recovery, and thinks it's processing an initialization. Unfortunately, it assumes that some routine that is called earlier in the processing of an initialization has been called, and has set a global pointer to point somewhere meaningful; alas, it has not, and it dies trying to dereference that pointer. > if instead of making allowances for this by just issuing a warning the > compiler *required* an equal-sign before the initializer, the problem > would likely go away. In fact, I'd vote for such a change... As of System V, all the old syntax (initializers without "=", the "=+", "=-", "=*", etc. operators) has, indeed, disappeared. Anybody out there with a S5 compiler care to try some of the guys that cause earlier PCCs to drop core? Guy Harris {seismo,ihnp4,allegra}!rlgvax!guy