Thread: C++ lint

  1. #1
    Registered User
    Join Date
    Jul 2005
    Posts
    25

    C++ lint

    I was just wondering if there is a free static code analyzer for C++ somewhere (yes, I'm a cheapskate). Of course, VC++ 2005 will warn me about lots of code smells, like uninitialized data or unreferenced variables, but I'm sure a specialized tool would make a better job of it.

  2. #2
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    PC-Lint. A must have. Link somewhere on my sig

    EDIT: Oh! You said free...

    Ahahaha! a free lint... you are a funny guy


    EDIT 2: Check here http://www.thefreecountry.com/progra...ebuggers.shtml for a few options. Unfortunately not as feature ridden as PC-Lint
    Last edited by Mario F.; 09-28-2006 at 04:23 PM.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  3. #3
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >Ahahaha! a free lint... you are a funny guy
    Well, for C++, sure. For C, there are at least two versions of lint available for free.
    My best code is written with the delete key.

  4. #4
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    I don't regreat having bought PC-lint. It was on expensive side of things but it's an incredible tool. But that is exactly what hurt me most then. Free C lints like Splint for instance

    Darn!
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    > I was just wondering if there is a free static code analyzer for C++ somewhere
    If there is any money involved (like you're being paid to do something) then lint is good value for money. It basically pays for itself when it finds the first few bugs which would have taken you several hours of digging in the code by other methods.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  6. #6
    Registered User
    Join Date
    Jul 2005
    Posts
    25
    Thank you all; I guess I'll just have to talk my manager into buying a copy...

  7. #7
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,246
    Learn C++ (C++ Books, C Books, FAQ, Forum Search)
    Code painter latest version on sourceforge DOWNLOAD NOW!
    Download FSB Data Integrity Tester.
    Siavosh K C

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. lint options
    By l2u in forum C++ Programming
    Replies: 2
    Last Post: 12-07-2006, 11:44 PM
  2. Lint
    By 00Sven in forum C Programming
    Replies: 1
    Last Post: 03-19-2006, 07:14 PM
  3. Lint
    By shiju in forum C Programming
    Replies: 3
    Last Post: 01-15-2004, 10:24 PM
  4. Regarding 'lint'...
    By Nutshell in forum C Programming
    Replies: 1
    Last Post: 04-15-2002, 10:21 AM
  5. Greenhand want help!
    By leereg in forum C Programming
    Replies: 6
    Last Post: 01-29-2002, 06:04 AM