From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f9437,127f0aa169891a7f X-Google-Attributes: gidf9437,public X-Google-Thread: fee84,bcf036d75aed9c51 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1993-10-07 05:05:58 PST Path: gmd.de!xlink.net!howland.reston.ans.net!pipex!uunet!pitt.edu!infidel From: infidel+@pitt.edu (todd j. derr) Newsgroups: comp.unix.osf.osf1 Subject: Re: Lint Picker? Message-ID: <3533@blue.cis.pitt.edu> Date: 7 Oct 93 06:46:33 GMT References: <4615@sparky.mdavcr.mda.ca> <28vrdi$7ik@usenet.pa.dec.com> Sender: news+@pitt.edu Organization: university of pittsburgh lrdc In article <4615@sparky.mdavcr.mda.ca> das@mdavcr.mda.ca (Darcy Semeniuk) writes: >The lint that comes with OSF/1 v1.3 isn't very good - ie it misses >things like: > >if ( a = b) >{ >[.....] >} hm, this actually surprised me, but I tried it using Ultrix lint and HP-UX 9.01 lint, and neither one complained about (a=b). Note that as the other poster said, the code _will_ get executed unless b=0. However, gcc -Wall (which is what I usually use, -Wall -pedanic -ansi), does catch it, saying "Warning: suggest parentheses around assignment used as truth value", which is nice, and a good habit to get in to. Borland C (I turn all warnings on there as well), complains "Possibly incorrect assignment", which is more the heart of it. hm, and to think I was feeling guilty for never using lint on my code. But, gcc -Wall -pedantic -ansi is probably just as good, if not better. Use it. todd. -- todd j. derr (infidel+@pitt.edu) \ +1 (412) 422-2534 (h) \ 624-7063 (w) university of pittsburgh lrdc \ moderator, comp.os.ms-windows.announce