Thread: An Overview of Static Analyzers for C/C++ Code

  1. #1
    Registered User
    Join Date
    Apr 2016
    Posts
    4

    An Overview of Static Analyzers for C/C++ Code

    C and C++ programmers tend to make mistakes when writing code.

    Many of these mistakes can be found using -Wall, asserts, tests, meticulous code review, IDE warnings, building with different compilers for different operating systems running on different hardware configurations, and the like. But even all these means combined often fail to reveal all the bugs. Static code analysis helps improve the situation a little. In this post, we will take a look at some static analysis tools.

    Below is a list of the common static code analyzers:


    • CppCheck
    • Clang Static Analyzer
    • PVS-Studio
    • Coverity Scan
    • Splint
    • Oclint


    Description and principle of operation of each analyzer, read the article: An Overview of Static Analyzers for C/C++ Code | How Not To Code

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    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.

  3. #3
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Also of interest, but maybe towards the end on an "Alternatives" section, could be unit testing frameworks that include partial static analysis capabilities. Cmocka, for instance.
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Looking for an overview from the Linux experts.
    By gemera in forum Linux Programming
    Replies: 25
    Last Post: 09-08-2013, 01:01 AM
  2. Structs and arrays - overview and help neede
    By pistacchio in forum C Programming
    Replies: 7
    Last Post: 01-11-2010, 02:11 AM
  3. AI types - Brief overview?
    By Queatrix in forum General AI Programming
    Replies: 3
    Last Post: 11-09-2005, 12:17 PM
  4. Help needed on Static Analyzers
    By arron in forum Networking/Device Communication
    Replies: 2
    Last Post: 08-22-2005, 12:03 AM

Tags for this Thread