lint still useful?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • copx

    lint still useful?

    I saw one here posting the output of a lint tool in a thread, and that made
    me wonder whether using such tools are still useful.

    I mean, modern compilers are lint tools themselves, the list of warnings GCC
    can produce is almost endless for example. I heard that lint was used in the
    past mainly because C compilers provided only minimal sanity checks back
    then.

    Do you use a lint tool? If yes, which one?





  • Eric Sosman

    #2
    Re: lint still useful?

    copx wrote:
    I saw one here posting the output of a lint tool in a thread, and that made
    me wonder whether using such tools are still useful.
    >
    I mean, modern compilers are lint tools themselves, the list of warnings GCC
    can produce is almost endless for example. I heard that lint was used in the
    past mainly because C compilers provided only minimal sanity checks back
    then.
    >
    Do you use a lint tool? If yes, which one?
    The one I use is an imperfect imitation of Karl W. Z. Heuer,
    emulated on inferior wetware.

    --
    Eric.Sosman@sun .com

    Comment

    • Spiros Bousbouras

      #3
      Re: lint still useful?

      On 11 Apr, 13:27, "copx" <c...@gazeta.pl wrote:
      I saw one here posting the output of a lint tool in a thread, and that made
      me wonder whether using such tools are still useful.
      >
      I mean, modern compilers are lint tools themselves, the list of warnings GCC
      can produce is almost endless for example. I heard that lint was used in the
      past mainly because C compilers provided only minimal sanity checks back
      then.
      There is practically an unlimited number of
      heuristics a code checking tool can use to
      guess that the programmer meant to write one
      thing and ended up typing another. If the
      programmer is willing to add comments in a
      specific format to aid the code checking tool
      (like splint allows) then there's even more
      room for originality. So how useful they are
      depends on how careful the programmer is, how
      likely he is to make the kind of mistakes a
      code checking tool can diagnose, how willing
      he is to play around with the different options
      of a code checking tool to find a combination
      which helps him the most etc. It's a very
      personal thing like for example the choice of
      programming language (if one has a choice).
      Do you use a lint tool? If yes, which one?
      Sometimes I use splint and sometimes Sun lint.
      I haven't found one which I'm very happy with
      but I haven't experimented much with splint's
      options.

      Comment

      • jaysome

        #4
        Re: lint still useful?

        On Fri, 11 Apr 2008 11:58:12 -0700, user923005 wrote:
        On Apr 11, 5:27 am, "copx" <c...@gazeta.pl wrote:
        >I saw one here posting the output of a lint tool in a thread, and that
        >made me wonder whether using such tools are still useful.
        >
        They are still useful. I lint all of my work.
        As should everyone.
        >I mean, modern compilers are lint tools themselves, the list of
        >warnings GCC can produce is almost endless for example. I heard that
        >lint was used in the past mainly because C compilers provided only
        >minimal sanity checks back then.
        >
        Modern compilers have better error checking than before. But Lint is
        better.
        >
        >Do you use a lint tool? If yes, which one?
        >
        Splint for C (it's free):
        http://www.splint.org/
        Fair advice.
        (Note that splint does not work with C++ code).
        PC-Lint for C and C++ on a PC (it's commercial): http://www.gimpel.com/
        Excellent advice.
        And Flexelint for C and C++ on non-PC platforms (same location as PC-
        Lint).
        Excellent advice.
        I also use bounds checkers and design verification tools and case tools
        and anything else I can get my hands on. They make you look a lot
        smarter than you are by finding things you are too dull to notice.
        ;-)
        Excellent advice.

        The more compilers and tools you can use on your code the better, IMHO.

        --
        jay

        Visual Studio dev tools & services make app development easy for any developer, on any platform & language. Develop with our code editor or IDE anywhere for free.

        Ubuntu is the modern, open source operating system on Linux for the enterprise server, desktop, cloud, and IoT.

        Intelligent automated testing platform covering every SDLC stage. Blend human insight with AI to validate software quality at speed and scale.

        PC-lint Plus is a static analysis tool that finds defects in software by analyzing the C and C++ source code.

        Build high-quality, secure software with application security testing tools and services from Black Duck. We are a Gartner Magic Quadrant Leader in AppSec.









        Comment

        Working...