C++check Changelog

What's new in C++check 1.68

Jan 6, 2015
  • New checks:
  • Multifile checking for buffer overruns and uninitialized variables
  • Improvements:
  • Libraries are now able to contain platform specific types
  • Improved handling of function overloads
  • Improved handling of integer literal suffixes
  • Improved stability of template parsing
  • Improved accuracy of ValueFlow analysis
  • Improved checking of pointer overflow
  • Support noexcept(false) - Support __attribute__((noreturn))
  • A bunch of additions to several Libraries, especially posix.cfg and qt.cfg
  • Additionally, lots of false positives and bugs have been fixed and several existing checks have been improved.

New in C++check 1.67 (Dec 30, 2014)

  • General changes:
  • Library files have now a 'format' attribute. Format version 1 is assumed by default
  • Cppcheck does no longer abort checking if unhandled characters (Non-ASCII) are found
  • New checks:
  • Check for unused return values
  • Detect shift by too many bits, signed integer overflow and dangerous sign conversion
  • Recommend usage of expm1(), log1p(), erfc()
  • Division by sizeof() as parameter to memset/memcpy/memmove/etc. as they expect a size in bytes
  • Several new va_arg related checks: -- Wrong parameter passed to va_start() -- Reference passed to va_start() -- Missing va_end() -- Using va_list before it is opened -- Subsequent calls to va_start/va_copy()
  • Initialization by itself in initializer list
  • Dead pointer usage when pointer alias local variable that has gone out of scope
  • Improvements:
  • Support uniform initialization syntax (C++11)
  • Much improvements to value flow analysis
  • Improved AST creation (support placement new, C++-style casts, templates, operator new[], ...)
  • Improved lambda support
  • Support GCC extension __attriute__((used)) and MSVC extension __declspec(property)
  • Better support for static member variables, inherited variables and namespaces
  • Improved typedef support where multiple variables are declared at once
  • Avoid checking code multiple times by calculating a checksum. Duplicate preprocessor configurations are eliminated by this.
  • Support C++03/C 'auto' keyword
  • HTML report: display 'verbose' message using clickable expandable divs
  • Additionally, lots of false positives and bugs have been fixed and several existing checks have been improved.

New in C++check 1.66 (Aug 5, 2014)

  • New checks:
  • Compare pointer with '\0'
  • Assigning boolean expression to floating point variables
  • Improvements:
  • Much improved AST
  • Much improved ValueFlow analysis
  • ValueFlow and AST now used by much more checks, improving checking accuracy and performance
  • Checking for self assignment now supports more complex expressions
  • Returning references to literals or references to calculation results is detected
  • Enhanced support for commutative operators in duplicate expression checking
  • Improved template/enum parsing
  • Much improved htmlreport
  • Definition of POD types in .cfg files
  • Definition of minsize for buffer arguments in .cfg files for buffer overflow checking
  • Fixed handling of #error: Do not report them if -f and -D are used together
  • New .cfg file for AVR platform
  • Generate xml dump of AST/ValueFlow/SymbolDatabase/TokenList if --dump is given
  • Improved performance in several cases
  • GUI:
  • Platform settings are being saved now
  • Improved handling of (invalid) .cfg files

New in C++check 1.65 (May 13, 2014)

  • General changes:
  • Cppcheck requires a C++11 compiler supporting the common subset of features supported by GCC 4.4, Visual Studio 2010 and Clang 2.9
  • Problems with packaging and windows installer introduced in last release were fixed
  • Improvements:
  • Much improved support of complex combinations of function pointers, arrays and references
  • Better handling of syntax errors
  • Better detection of stack variables passed to free()
  • Much improved value flow analysis
  • More robust error detection in several checks due to usage of AST
  • Better handling of unknown Macros in function declarations
  • Allocation/Deallocation functions can be extend across different .cfg files
  • Better handling of some C++11 language features like enum class, in-class member initializers
  • Detect calling (std::)abs() with bool argument
  • New checks:
  • Check for noexcept and __attribute__((nothrow)) correctness
  • Check for unhandled exceptions when exception specifiers are used
  • Access to empty STL containers
  • Repositioning operation on a file opened in append mode
  • Find nested redundant if-statements (was experimental before) Additionally, a large number of false positives and crashs has been fixed.

New in C++check 1.40 (Jan 25, 2010)

  • Added TODO test for better pointer aliasing with memset

New in C++check 1.30 (Mar 10, 2009)

  • Bugs fixed:
  • Segmentation fault
  • Compiler error
  • Other fixes/enhancements:
  • suppress errors about memory leaks for classes that are automaticly deallocated (through "--auto-dealloc")
  • Added option for controlling exit value (through "--error-exitcode")
  • Added command line option "--version" * better handling of __asm code blocks
  • fixed false positives about unused private functions
  • fixed false positives about memory leaks
  • fixed wrong line numbers in error messages

New in C++check 1.29 (Mar 3, 2009)

  • New checks:
  • memory allocation: mismatching size
  • returning pointer to local stack variable
  • STL container overrun
  • STL: dangerous usage of erase
  • STL: dangerous usage of push_back
  • Improved checks:
  • There have been many improvements to the tokenizer, all existing checks became better and more accurate
  • uninitialized variables: more cases are detected
  • memory leaks: more cases are detected

New in C++check 1.28 (Feb 3, 2009)

  • Command line:
  • Now you can specify extra include directories through "-I"
  • Preliminary xml output through --xml-results. This will be improved further.
  • The return value of cppcheck is 0 only if no errors are found. When errors are found EXIT_FAILURE is returned.
  • Added support for .C and .c++ files
  • New checks:
  • sprintf - using overlapping data in input and output
  • usage of a freed pointer
  • freeing a pointer that has already been freed
  • string pointer arithmetic: .. = "abc" + 'd'; => .. = "abc" + (int)'d';
  • mktemp can be dangerous
  • Removed checks that we think many compilers handle well
  • unused variable
  • unreachable code
  • assignment in condition
  • Improvements:
  • Preprocessor macros are handled.

New in C++check 1.26 (Dec 2, 2008)

  • Major restructuring and refactoring were made by Aggro
  • Buffer overruns: moved recursive checking to "--all" because there were false positives
  • Buffer overruns: fixed false positive (get pointer to data beyond array is not wrong)
  • Memory leaks: Recursive checking
  • Memory leaks: Fixed a number of issues in the tracker
  • Unused functions: new check that is both faster and better than the old one
  • Class checking: Stronger checking of classes
  • Resource leaks: check for fopen/popen resource leaks Special thanks to kush_eplus for spotting many problems.

New in C++check 1.25 (Nov 4, 2008)

  • Added a new testing framework License information was added (GPL 3) No new checks. But the existing checks were improved. The accuracy was improved for these checks (removed false positives).
  • Unsigned division
  • Memory Leaks
  • Mismatching allocation and deallocation
  • Uninitialized member variables
  • Incomplete statements