Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!houxm!whuxl!whuxlm!akgua!gatech!seismo!mcvax!vmucnam!axis!philip From: philip@axis.UUCP Newsgroups: net.lang.c Subject: Re: questions from using lint Message-ID: <512@axis.UUCP> Date: Fri, 18-Apr-86 05:42:14 EST Article-I.D.: axis.512 Posted: Fri Apr 18 05:42:14 1986 Date-Received: Mon, 21-Apr-86 03:49:12 EST References: <7097@cca.UUCP> <759@ccird2.UUCP> Reply-To: philip@axis.UUCP (Philip Peake) Organization: Axis Digital, 135 rue d'Aguesseau, Boulogne, 92100, FRANCE Lines: 31 Just a comment on using lint to improve code portability: I agree entierely that lint really does cut down on debugging time and should always be used during development. However, some of my experiences with portability are not so encouraging. We sell a Pascal -> C translator (written in C) which we port to (almost) any UNIX system which has a C compiler. When I took over responsibility for this product, there was an outstanding job - porting to a RIDGE running ROS (not a real unix anyway). This had been attempted by my predecessor and abandoned. When I looked at the problem I didn't blame him - the translator uses lots of variable argument lists, and the RIDGE has a wierd method of passing arguments! To help me to find out where the problems lay, I used lint. It took about three weeks of work to make the whole think lint-free, but it was worth it, it worked! (I had to write my own version of varargs). Now comes the nasty bit: One day I tried to port this to another machine (which shall remain nameless), and the compiler produced LOTS of messages about pointer coercions (you guessed it, its one of those machines with ints and pointers of different sizes). I ran lint and it produced about 5 pages of complaints - not all related to pointers. It would seem that some people out there MODIFY lint to match their own compilers. This makes using lint just about worthless when trying to write portable code. The only consolation is that such a nasty trick seems to be quite rare. The moral is BEWARE lint-free one one machine may not be lint free on another.