Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site ho95b.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!ihnp4!houxm!ho95b!wcs From: wcs@ho95b.UUCP (Bill Stewart) Newsgroups: net.bugs.4bsd Subject: Re: bug in lint (really - oldfashioned =op) Message-ID: <313@ho95b.UUCP> Date: Wed, 20-Feb-85 23:10:32 EST Article-I.D.: ho95b.313 Posted: Wed Feb 20 23:10:32 1985 Date-Received: Fri, 22-Feb-85 09:29:47 EST References: <376@harvard.ARPA> <466@rlgvax.UUCP> <2305@randvax.UUCP> <497@rlgvax.UUCP> Distribution: net Organization: AT&T Bell Labs, Holmdel NJ Lines: 30 > 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 Unfortunately, the old =- is still with us in System V, sort of: main(){ int j; j=5; j=-1; } Under System V, both lint and cc complain that the j=-1 line is ambiguous, and select the assignment-op. Then they reject it, and don't produce object code. Under System V Rel 2, it finally lets you say j=-1; when you mean j = (-1); - the lint comment is that the assignment is ambiguous, but the unary-op is chosen, so it does it right this time. Bill Stewart P.S. I didn't remember the old init syntax, so I haven't tried it. -- Bill Stewart AT&T Bell Labs, Holmdel NJ 1-201-949-0705 ...!ihnp4!ho95b!wcs