Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!usc!samsung!think!barmar From: barmar@think.com (Barry Margolin) Newsgroups: comp.lang.c Subject: Re: Can lint help an ANSI-C programmer? Message-ID: <36985@think.Think.COM> Date: 31 May 90 21:17:15 GMT References: <6328.265D8157@puddle.fidonet.org> <1754@tkou02.enet.dec.com> <00937758.16FBE220@rigel.efd.lth.se> <24660@mimsy.umd.edu> <009377E6.C32DAB80@rigel.efd.lth.se> Sender: news@Think.COM Reply-To: barmar@nugodot.think.com (Barry Margolin) Organization: Thinking Machines Corporation, Cambridge MA, USA Lines: 21 In article <009377E6.C32DAB80@rigel.efd.lth.se> e89hse@rigel.efd.lth.se writes: >In article <24660@mimsy.umd.edu>, cml@tove.cs.umd.edu (Christopher Lott) writes: >> Lint can also help detect >>nonportable constructs, but I can't think of a good example just now. > Yes, but a compiler could warn you about that. (I'm not sure if anyone do.) There are very few things that lint warns about that a compiler *couldn't*. But it checks lots of things that many C compilers *don't*. It is traditional that C compilers do minimal checking, and lint is used when the programmer wants extensive checking. This tradition is fading, though, as C has reached more environments. For instance, integrated development systems such as Turbo C generally ignore this tradition. GNU C also does lots of checking (although there are options to control it) because the GNU developers don't believe in tradition for its own sake. Additionally, hardware these days is much faster than the hardware that originally ran C, so adding the checks to the compiler doesn't make it intolerably slow. -- Barry Margolin, Thinking Machines Corp. barmar@think.com {uunet,harvard}!think!barmar