Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!bionet!ames!uhccux!munnari.oz.au!labtam!iand From: iand@labtam.oz (Ian Donaldson) Newsgroups: comp.bugs.4bsd Subject: Re: Bug in indent. Message-ID: <5042@labtam.oz> Date: 25 Jul 90 01:25:17 GMT References: <2125@gould.doc.ic.ac.uk> Organization: Labtam Limited., Melbourne, Australia Lines: 45 dcw@doc.ic.ac.uk (Duncan C White) writes: >Greetings, > On examination, this is because the x=!x line has been rewritten as: > x != x; This sounds like the old C syntax problem that most C compilers *warn* about still. ie: x=-3; used to mean x -= 3; whereas if you really wanted -3 assigned to x you were supposed to put extra spaces in: x = -3; eg: if you compile this with SVR3.2.1 C compiler you get no warnings: main() { int x; x=-3; (void) printf("%d\n", x); return(0); } and running it prints '-3', but if you run SVR3.2.1 lint over the code you see: (5) warning: ambiguous assignment: simple assign, unary op assumed So it looks like the compiler is forgiving but lint still knows the old way things were done. I remember older compilers complaining about such syntax too. Maybe the =! case is similar. Maybe indent should warn about it if it does a conversion. Ian D