Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Generated Content
Info
title
Note

This page is was automatically generated from the "Automated Detection" sections in the individual guidelines. Do not modify this page directly.

Version number:
3.2

and should not be edited.

Note

The information on this page was provided by outside contributors and has not been verified by SEI CERT.

Tip

The table below can be re-ordered, by clicking column headers.

...

Include Page
PRQA QA-C++_V
PRQA QA-C++_V

Checker

Guideline

0014 DCL52-CPP. Never qualify a reference type with const or volatile
1510 MSC52-CPP. Value-returning functions must return a value from all exit paths
1772 CON53-CPP. Avoid deadlock by locking in a predefined order
1773 CON53-CPP. Avoid deadlock by locking in a predefined order
1774 CON52-CPP. Prevent data races when accessing bit-fields from multiple threads
1775 CON52-CPP. Prevent data races when accessing bit-fields from multiple threads
2012 DCL50-CPP. Do not define a C-style variadic function
2110 MEM51-CPP. Properly deallocate dynamically allocated resources
2111 MEM51-CPP. Properly deallocate dynamically allocated resources
2112 MEM51-CPP. Properly deallocate dynamically allocated resources
2113 MEM51-CPP. Properly deallocate dynamically allocated resources
2118 MEM51-CPP. Properly deallocate dynamically allocated resources
2160 DCL54-CPP. Overload allocation and deallocation functions as a pair in the same scope
2502 DCL53-CPP. Do not write syntactically ambiguous declarations
2510 DCL53-CPP. Do not write syntactically ambiguous declarations
2518 DCL59-CPP. Do not define an unnamed namespace in a header file
2625 DCL50-CPP. Do not define a C-style variadic function
2668 CTR54-CPP. Do not subtract iterators that do not refer to the same container
2726 EXP53-CPP. Do not read uninitialized memory
2727 EXP53-CPP. Do not read uninitialized memory
2728 EXP53-CPP. Do not read uninitialized memory
2761 CTR54-CPP. Do not subtract iterators that do not refer to the same container
2762 CTR54-CPP. Do not subtract iterators that do not refer to the same container
2763 CTR54-CPP. Do not subtract iterators that do not refer to the same container
2766 CTR54-CPP. Do not subtract iterators that do not refer to the same container
2767 CTR54-CPP. Do not subtract iterators that do not refer to the same container
2768 CTR54-CPP. Do not subtract iterators that do not refer to the same container
2810 OOP55-CPP. Do not use pointer-to-member operators to access nonexistent members
2811 OOP55-CPP. Do not use pointer-to-member operators to access nonexistent members
2812 EXP54-CPP. Do not access an object outside of its lifetime
2812 OOP55-CPP. Do not use pointer-to-member operators to access nonexistent members
2813 EXP54-CPP. Do not access an object outside of its lifetime
2813 OOP55-CPP. Do not use pointer-to-member operators to access nonexistent members
2814 EXP54-CPP. Do not access an object outside of its lifetime
2814 OOP55-CPP. Do not use pointer-to-member operators to access nonexistent members
2888 MSC54-CPP. A signal handler must be a plain old function
2891 CTR50-CPP. Guarantee that container indices and iterators are within the valid range
2930 EXP54-CPP. Do not access an object outside of its lifetime
2931 EXP54-CPP. Do not access an object outside of its lifetime
2932 EXP54-CPP. Do not access an object outside of its lifetime
2933 EXP54-CPP. Do not access an object outside of its lifetime
2934 EXP54-CPP. Do not access an object outside of its lifetime
2961 EXP53-CPP. Do not read uninitialized memory
2962 EXP53-CPP. Do not read uninitialized memory
2963 EXP53-CPP. Do not read uninitialized memory
2966 EXP53-CPP. Do not read uninitialized memory
2967 EXP53-CPP. Do not read uninitialized memory
2968 EXP53-CPP. Do not read uninitialized memory
2971 EXP53-CPP. Do not read uninitialized memory
2972 EXP53-CPP. Do not read uninitialized memory
2973 EXP53-CPP. Do not read uninitialized memory
2976 EXP53-CPP. Do not read uninitialized memory
2977 EXP53-CPP. Do not read uninitialized memory
2978 EXP53-CPP. Do not read uninitialized memory
3013 INT50-CPP. Do not cast to an out-of-range enumeration value
3033. 3038 EXP56-CPP. Do not call a function with a mismatched language linkage
3066 EXP55-CPP. Do not access a cv-qualified object through a cv-unqualified type
3072 OOP51-CPP. Do not slice derived objects
3073 CTR56-CPP. Do not use pointer arithmetic on polymorphic objects
3139 CTR50-CPP. Guarantee that container indices and iterators are within the valid range
3140 CTR50-CPP. Guarantee that container indices and iterators are within the valid range
3220 EXP50-CPP. Do not depend on the order of evaluation for side effects
3221 EXP50-CPP. Do not depend on the order of evaluation for side effects
3222 EXP50-CPP. Do not depend on the order of evaluation for side effects
3223 EXP50-CPP. Do not depend on the order of evaluation for side effects
3225 CTR58-CPP. Predicate function objects should not be mutable
3225 MEM52-CPP. Detect and handle memory allocation errors
3226 CTR58-CPP. Predicate function objects should not be mutable
3226 MEM52-CPP. Detect and handle memory allocation errors
3227 CTR58-CPP. Predicate function objects should not be mutable
3227 MEM52-CPP. Detect and handle memory allocation errors
3228 EXP50-CPP. Do not depend on the order of evaluation for side effects
3228 CTR58-CPP. Predicate function objects should not be mutable
3228 MEM52-CPP. Detect and handle memory allocation errors
3229 CTR58-CPP. Predicate function objects should not be mutable
3229 MEM52-CPP. Detect and handle memory allocation errors
3230 CTR58-CPP. Predicate function objects should not be mutable
3231 CTR58-CPP. Predicate function objects should not be mutable
3232 CTR58-CPP. Predicate function objects should not be mutable
3233 CTR58-CPP. Predicate function objects should not be mutable
3234 CTR58-CPP. Predicate function objects should not be mutable
3240 EXP52-CPP. Do not rely on side effects in unevaluated operands
3241 EXP52-CPP. Do not rely on side effects in unevaluated operands
3337 MEM51-CPP. Properly deallocate dynamically allocated resources
3339 MEM51-CPP. Properly deallocate dynamically allocated resources
3402 OOP52-CPP. Do not delete a polymorphic object without a virtual destructor
3403 OOP52-CPP. Do not delete a polymorphic object without a virtual destructor
3404 OOP52-CPP. Do not delete a polymorphic object without a virtual destructor
3508 ERR60-CPP. Exception objects must be nothrow copy constructible
3510 ERR53-CPP. Do not reference base classes or class data members in a constructor or destructor function-try-block handler
3802 CTR53-CPP. Use valid iterator ranges
4003 EXP54-CPP. Do not access an object outside of its lifetime
4026 EXP54-CPP. Do not access an object outside of its lifetime
4030 ERR54-CPP. Catch handlers should order their parameter types from most derived to least derived
4031 ERR61-CPP. Catch exceptions by lvalue reference
4032 DCL58-CPP. Do not modify the standard namespaces
4035 DCL58-CPP. Do not modify the standard namespaces
4035 ERR51-CPP. Handle all exceptions
4035 ERR55-CPP. Honor exception specifications
4036 ERR51-CPP. Handle all exceptions
4036 ERR55-CPP. Honor exception specifications
4037 ERR51-CPP. Handle all exceptions
4053 OOP53-CPP. Write constructor member initializers in the canonical order
4072 OOP54-CPP. Gracefully handle self-copy assignment
4073 OOP54-CPP. Gracefully handle self-copy assignment
4075 ERR56-CPP. Guarantee exception safety
4075 OOP54-CPP. Gracefully handle self-copy assignment
4075 OOP58-CPP. Copy operations must not mutate the source object
4076 ERR56-CPP. Guarantee exception safety
4076 OOP54-CPP. Gracefully handle self-copy assignment
4260

Checker

Guideline

-q & Name CheckMSC53-CPP. Do not modify the standard namespaces
-wc strtokSTR06-CPP. Do not assume that strtok() leaves the parse string unchanged
0600PRE05-CPP. Understand macro replacement when concatenating tokens or performing stringification
0601PRE05-CPP. Understand macro replacement when concatenating tokens or performing stringification
1000PRE06-CPP. Enclose header files in an inclusion guard
1001PRE06-CPP. Enclose header files in an inclusion guard
1020PRE00-CPP. Avoid defining macros
1021PRE00-CPP. Avoid defining macros
1025DCL00-CPP. Const-qualify immutable objects
1025PRE00-CPP. Avoid defining macros
1026DCL00-CPP. Const-qualify immutable objects
1026PRE00-CPP. Avoid defining macros
1030PRE01-CPP. Use parentheses within macros around parameter names
1031PRE02-CPP. Macro replacement lists should be parenthesized
1038MSC14-CPP. Do not introduce unnecessary platform dependencies
1038PRE05-CPP. Understand macro replacement when concatenating tokens or performing stringification
1039MSC14-CPP. Do not introduce unnecessary platform dependencies
1039PRE05-CPP. Understand macro replacement when concatenating tokens or performing stringification
1067MSC52-CPP. Obey the one-definition rule
1092PRE07-CPP. Avoid using repeated question marks
1095MSC09-CPP. Character encoding: Use subset of ASCII for safety
1100MSC14-CPP. Do not introduce unnecessary platform dependencies
14DCL52-CPP. Never qualify a reference type with const or volatile
150STR04-CPP. Use plain char for characters in the basic character set
1500MSC13-CPP. Detect and remove unused values
1502MSC13-CPP. Detect and remove unused values
1504DCL07-CPP. Minimize the scope of variables and methods
1504DCL15-CPP. Declare file-scope objects or functions that do not need external linkage in an unnamed namespace
1505DCL07-CPP. Minimize the scope of variables and methods
1505DCL15-CPP. Declare file-scope objects or functions that do not need external linkage in an unnamed namespace
1509MSC52-CPP. Obey the one-definition rule
1514DCL15-CPP. Declare file-scope objects or functions that do not need external linkage in an unnamed namespace
1515PRE08-CPP. Guarantee that header file names are unique
1516PRE08-CPP. Guarantee that header file names are unique
1517PRE08-CPP. Guarantee that header file names are unique
1520MEM05-CPP. Avoid large stack allocations
1521MEM05-CPP. Avoid large stack allocations
1530MEM08-CPP. Use new and delete rather than raw memory allocation and deallocation
1531DCL07-CPP. Minimize the scope of variables and methods
1531DCL15-CPP. Declare file-scope objects or functions that do not need external linkage in an unnamed namespace
1532DCL15-CPP. Declare file-scope objects or functions that do not need external linkage in an unnamed namespace
1533DCL07-CPP. Minimize the scope of variables and methods
1533DCL15-CPP. Declare file-scope objects or functions that do not need external linkage in an unnamed namespace
1550DCL14-CPP. Avoid assumptions about the initialization order between translation units
1551DCL14-CPP. Avoid assumptions about the initialization order between translation units
1552DCL14-CPP. Avoid assumptions about the initialization order between translation units
1553DCL14-CPP. Avoid assumptions about the initialization order between translation units
1554DCL14-CPP. Avoid assumptions about the initialization order between translation units
1555DCL14-CPP. Avoid assumptions about the initialization order between translation units
1556DCL14-CPP. Avoid assumptions about the initialization order between translation units
1557DCL14-CPP. Avoid assumptions about the initialization order between translation units
1558DCL14-CPP. Avoid assumptions about the initialization order between translation units
1559DCL14-CPP. Avoid assumptions about the initialization order between translation units
1710DCL02-CPP. Use visually distinct identifiers
1808DCL04-CPP. Do not declare more than one variable per declaration
2001MEM13-CPP. Use smart pointers instead of raw pointers for resource management
2009DCL17-CPP. Declare function parameters that are large data structures and are not changed by the function as const references
2010DCL17-CPP. Declare function parameters that are large data structures and are not changed by the function as const references
2012DCL50-CPP. Do not define a C-style variadic function
2019OOP04-CPP. Prefer not to give virtual functions default argument initializers
2070DCL11-CPP. Preserve operator semantics when overloading operators
2071DCL11-CPP. Preserve operator semantics when overloading operators
2072DCL11-CPP. Preserve operator semantics when overloading operators
2073DCL11-CPP. Preserve operator semantics when overloading operators
2074DCL11-CPP. Preserve operator semantics when overloading operators
2075MSC14-CPP. Do not introduce unnecessary platform dependencies
2076MSC14-CPP. Do not introduce unnecessary platform dependencies
2077DCL10-CPP. Do not overload the ampersand, comma, logical AND or logical OR operators
2078DCL10-CPP. Do not overload the ampersand, comma, logical AND or logical OR operators
2079DCL10-CPP. Do not overload the ampersand, comma, logical AND or logical OR operators
2081DCL11-CPP. Preserve operator semantics when overloading operators
2082DCL11-CPP. Preserve operator semantics when overloading operators
2085MSC14-CPP. Do not introduce unnecessary platform dependencies
2090DCL11-CPP. Preserve operator semantics when overloading operators
2092DCL10-CPP. Do not overload the ampersand, comma, logical AND or logical OR operators
2097DCL11-CPP. Preserve operator semantics when overloading operators
2100OOP00-CPP. Declare data members private
2101OOP00-CPP. Declare data members private
2110OOP06-CPP. Create a private copy constructor and assignment operator for non copyable objects
2112OOP06-CPP. Create a private copy constructor and assignment operator for non copyable objects
2113OOP06-CPP. Create a private copy constructor and assignment operator for non copyable objects
2114MSC14-CPP. Do not introduce unnecessary platform dependencies
2116OOP52-CPP. Do not delete a polymorphic object without a virtual destructor
2120OOP03-CPP. Prefer not to overload virtual functions
2121OOP02-CPP. Do not hide inherited non-virtual member functions
2125MSC14-CPP. Do not introduce unnecessary platform dependencies
2139MSC14-CPP. Do not introduce unnecessary platform dependencies
2159OOP07-CPP. Do not inherit from multiple classes that have distinct objects with the same name
2160DCL54-CPP. Overload allocation and deallocation functions as a pair in the same scope
2161DCL54-CPP. Overload allocation and deallocation functions as a pair in the same scope
2178MSC14-CPP. Do not introduce unnecessary platform dependencies
2180OOP09-CPP. Ensure that single-argument constructors are marked "explicit"
2181OOP01-CPP. Be careful with the definition of conversion operators
2200MSC14-CPP. Do not introduce unnecessary platform dependencies
2201MSC14-CPP. Do not introduce unnecessary platform dependencies
2202MSC14-CPP. Do not introduce unnecessary platform dependencies
2300DCL15-CPP. Declare file-scope objects or functions that do not need external linkage in an unnamed namespace
2304INT12-CPP. Do not make assumptions about the type of a plain int bit-field when used in an expression
2306INT12-CPP. Do not make assumptions about the type of a plain int bit-field when used in an expression
2307INT12-CPP. Do not make assumptions about the type of a plain int bit-field when used in an expression
2308INT12-CPP. Do not make assumptions about the type of a plain int bit-field when used in an expression
2309INT12-CPP. Do not make assumptions about the type of a plain int bit-field when used in an expression
2310DCL14-CPP. Avoid assumptions about the initialization order between translation units
2313DCL15-CPP. Declare file-scope objects or functions that do not need external linkage in an unnamed namespace
2314DCL15-CPP. Declare file-scope objects or functions that do not need external linkage in an unnamed namespace
2410CTR00-CPP. Understand when to prefer vectors over arrays
2411CTR00-CPP. Understand when to prefer vectors over arrays
2413MSC14-CPP. Do not introduce unnecessary platform dependencies
2422INT09-CPP. Ensure enumeration constants map to unique values
2423INT09-CPP. Ensure enumeration constants map to unique values
2426DCL05-CPP. Use typedefs to improve code readability
2427PRE03-CPP. Prefer typedefs to defines for encoding types
2428PRE03-CPP. Prefer typedefs to defines for encoding types
2500DCL01-CPP. Do not reuse variable names in subscopes
2501DCL01-CPP. Do not reuse variable names in subscopes
2502DCL01-CPP. Do not reuse variable names in subscopes
2503DCL01-CPP. Do not reuse variable names in subscopes
2504DCL01-CPP. Do not reuse variable names in subscopes
2505DCL01-CPP. Do not reuse variable names in subscopes
2510DCL53-CPP. Do not write syntactically ambiguous declarations
2624OOP04-CPP. Prefer not to give virtual functions default argument initializers
2625DCL50-CPP. Do not define a C-style variadic function
2640MSC14-CPP. Do not introduce unnecessary platform dependencies
2761CTR54-CPP. Do not subtract iterators that do not refer to the same container
2762CTR54-CPP. Do not subtract iterators that do not refer to the same container
2763CTR54-CPP. Do not subtract iterators that do not refer to the same container
2766CTR54-CPP. Do not subtract iterators that do not refer to the same container
2767CTR54-CPP. Do not subtract iterators that do not refer to the same container
2768CTR54-CPP. Do not subtract iterators that do not refer to the same container
2771CTR54-CPP. Do not subtract iterators that do not refer to the same container
2772CTR54-CPP. Do not subtract iterators that do not refer to the same container
2773CTR54-CPP. Do not subtract iterators that do not refer to the same container
2800INT08-CPP. Verify that all integer values are in range
2801INT08-CPP. Verify that all integer values are in range
2802INT08-CPP. Verify that all integer values are in range
2803INT08-CPP. Verify that all integer values are in range
2840EXP03-CPP. Do not assume the size of a class or struct is the sum of the sizes of its members
2841EXP03-CPP. Do not assume the size of a class or struct is the sum of the sizes of its members
2842EXP03-CPP. Do not assume the size of a class or struct is the sum of the sizes of its members
2843EXP03-CPP. Do not assume the size of a class or struct is the sum of the sizes of its members
2844EXP03-CPP. Do not assume the size of a class or struct is the sum of the sizes of its members
2910INT08-CPP. Verify that all integer values are in range
2911INT08-CPP. Verify that all integer values are in range
2912INT08-CPP. Verify that all integer values are in range
2913INT08-CPP. Verify that all integer values are in range
2940INT16-CPP. Do not make assumptions about representation of signed integers
2941INT16-CPP. Do not make assumptions about representation of signed integers
2942INT16-CPP. Do not make assumptions about representation of signed integers
2943INT16-CPP. Do not make assumptions about representation of signed integers
2945INT16-CPP. Do not make assumptions about representation of signed integers
2946INT16-CPP. Do not make assumptions about representation of signed integers
2947INT16-CPP. Do not make assumptions about representation of signed integers
2948INT16-CPP. Do not make assumptions about representation of signed integers
2980MSC13-CPP. Detect and remove unused values
2981MSC13-CPP. Detect and remove unused values
2982MSC13-CPP. Detect and remove unused values
2983MSC13-CPP. Detect and remove unused values
2984MSC13-CPP. Detect and remove unused values
2985MSC13-CPP. Detect and remove unused values
2986MSC13-CPP. Detect and remove unused values
3000INT02-CPP. Understand integer conversion rules
3001INT02-CPP. Understand integer conversion rules
3001STR07-CPP. Don't assume numeric values for expressions with type plain character
3002INT02-CPP. Understand integer conversion rules
3003INT02-CPP. Understand integer conversion rules
3003INT13-CPP. Use bitwise operators only on unsigned operands
3004INT13-CPP. Use bitwise operators only on unsigned operands
3005INT02-CPP. Understand integer conversion rules
3006INT02-CPP. Understand integer conversion rules
3007INT02-CPP. Understand integer conversion rules
3010INT02-CPP. Understand integer conversion rules
3011FLP05-CPP. Convert integers to floating point for floating point operations
3011INT02-CPP. Understand integer conversion rules
3012INT02-CPP. Understand integer conversion rules
3015INT02-CPP. Understand integer conversion rules
3016INT02-CPP. Understand integer conversion rules
3017EXP11-CPP. Do not apply operators expecting one type to data of an incompatible type
3017MSC14-CPP. Do not introduce unnecessary platform dependencies
3030EXP11-CPP. Do not apply operators expecting one type to data of an incompatible type
3044INT11-CPP. Take care when converting from pointer to integer or integer to pointer
3045INT11-CPP. Take care when converting from pointer to integer or integer to pointer
3058MSC02-CPP. Avoid errors of omission
3063STR05-CPP. Use pointers to const when referring to string literals
3064STR05-CPP. Use pointers to const when referring to string literals
3072CTR56-CPP. Do not use pointer arithmetic on polymorphic objects
3072OOP51-CPP. Do not slice derived objects
3073CTR56-CPP. Do not use pointer arithmetic on polymorphic objects
3073OOP51-CPP. Do not slice derived objects
3076EXP13-CPP. Prefer dynamic_cast over static_cast over reinterpret_cast
3080EXP05-CPP. Do not use C-style casts
3082EXP05-CPP. Do not use C-style casts
3090EXP14-CPP. Do not use reinterpret_cast on pointers to class objects with multiple inheritence
3220EXP50-CPP. Do not depend on the order of evaluation for side effects
3221EXP50-CPP. Do not depend on the order of evaluation for side effects
3222EXP50-CPP. Do not depend on the order of evaluation for side effects
3223EXP50-CPP. Do not depend on the order of evaluation for side effects
3224ERR01-CPP. Use ferror() rather than errno to check for FILE stream errors
3230EXP02-CPP. Be aware of the short-circuit behavior of the logical AND and OR operators
3231EXP02-CPP. Be aware of the short-circuit behavior of the logical AND and OR operators
3242MSC03-CPP. Avoid errors of addition
3243MSC03-CPP. Avoid errors of addition
3244MSC03-CPP. Avoid errors of addition
3244MSC12-CPP. Detect and remove code that has no effect
3245MSC03-CPP. Avoid errors of addition
3245MSC12-CPP. Detect and remove code that has no effect
3247MSC14-CPP. Do not introduce unnecessary platform dependencies
3248MSC14-CPP. Do not introduce unnecessary platform dependencies
3249MSC14-CPP. Do not introduce unnecessary platform dependencies
3250MSC14-CPP. Do not introduce unnecessary platform dependencies
3290EXP18-CPP. Prefer the prefix forms of ++ and --
3292EXP18-CPP. Prefer the prefix forms of ++ and --
3301OOP05-CPP. Avoid deleting this
3320MSC14-CPP. Do not introduce unnecessary platform dependencies
3332MEM08-CPP. Use new and delete rather than raw memory allocation and deallocation
3334MEM08-CPP. Use new and delete rather than raw memory allocation and deallocation
3400MSC14-CPP. Do not introduce unnecessary platform dependencies
3401MSC14-CPP. Do not introduce unnecessary platform dependencies
3403OOP52-CPP. Do not delete a polymorphic object without a virtual destructor
3500ERR08-CPP. Prefer special-purpose types for exceptions
3505ERR08-CPP. Prefer special-purpose types for exceptions
3506ERR08-CPP. Prefer special-purpose types for exceptions
3507ERR08-CPP. Prefer special-purpose types for exceptions
3508ERR60-CPP. Exception objects must be nothrow copy constructible
3510ERR53-CPP. Do not reference base classes or class data members in a constructor or destructor function-try-block handler
3700EXP00-CPP. Use parentheses for precedence of operation
3700EXP17-CPP. Treat relational and equality operators as if they were nonassociative
3702EXP00-CPP. Use parentheses for precedence of operation
3703EXP00-CPP. Use parentheses for precedence of operation
3705EXP08-CPP. Ensure pointer arithmetic is used correctly
3706EXP08-CPP. Ensure pointer arithmetic is used correctly
3708FLP02-CPP. Avoid using floating point numbers when precise computation is needed
3709EXP17-CPP. Treat relational and equality operators as if they were nonassociative
3715INT07-CPP. Use only explicitly signed or unsigned char type for numeric values
3716INT07-CPP. Use only explicitly signed or unsigned char type for numeric values
3717INT07-CPP. Use only explicitly signed or unsigned char type for numeric values
3802EXP12-CPP. Do not ignore values returned by functions or methods
3968MEM08-CPP. Use new and delete rather than raw memory allocation and deallocation
4011MSC18-CPP. Finish every set of statements associated with a case label with a break statement
4013MSC20-CPP. Do not use a switch statement to transfer control into a complex block
4014MSC20-CPP. Do not use a switch statement to transfer control into a complex block
4024OOP08-CPP. Do not return references to private data
4028OOP08-CPP. Do not return references to private data
4031ERR09-CPP. Throw anonymous temporaries
4033ERR08-CPP. Prefer special-purpose types for exceptions
4034ERR54-CPP. Catch handlers should order their parameter types from most derived to least derived
4037ERR50-CPP. Do not call std::terminate(), std::abort(), or std::_Exit()
4038ERR50-CPP. Do not call std::terminate(), std::abort(), or std::_Exit()
4040ERR54-CPP. Catch handlers should order their parameter types from most derived to least derived
4053OOP53-CPP. Write constructor member initializers in the canonical order
4056OOP53-CPP. Write constructor member initializers in the canonical order
4058OOP53-CPP. Write constructor member initializers in the canonical order
4060MSC03-CPP. Avoid errors of addition
4070MSC01-CPP. Strive for logical completeness
4071EXP19-CPP. Do not perform assignments in conditional expressions
4071MSC02-CPP. Avoid errors of omission
4072OOP54-CPP. Gracefully handle self-assignment
4073OOP54-CPP. Gracefully handle self-assignment
4075ERR56-CPP. Guarantee exception safety
4075OOP54-CPP. Gracefully handle self-assignment
4076ERR56-CPP. Guarantee exception safety
4076OOP54-CPP. Gracefully handle self-assignment
4090DCL03-CPP. Use a static assertion to test the value of a constant expression
4101DCL19-CPP. Initialize automatic local variables on declaration
4102DCL19-CPP. Initialize automatic local variables on declaration
4107DCL04-CPP. Do not declare more than one variable per declaration
4108DCL04-CPP. Do not declare more than one variable per declaration
4113DCL07-CPP. Minimize the scope of variables and methods
4114DCL07-CPP. Minimize the scope of variables and methods
4206DCL19-CPP. Initialize automatic local variables on declaration
4207DCL19-CPP. Initialize automatic local variables on declaration
4213DCL13-CPP. Declare function parameters that are pointers to values not changed by the function as const
4218DCL19-CPP. Initialize automatic local variables on declaration
4219DCL19-CPP. Initialize automatic local variables on declaration
424MEM02-CPP. Immediately cast the result of a memory allocation function call into a pointer to the allocated type
4260OOP50-CPP. Do not invoke virtual functions from constructors or destructors
4261OOP50-CPP. Do not invoke virtual functions from constructors or destructors
4265DCL19-CPP. Initialize automatic local variables on declaration
4269DCL19-CPP. Initialize automatic local variables on declaration
4270DCL19-CPP. Initialize automatic local variables on declaration
4271DCL19-CPP. Initialize automatic local variables on declaration
4272DCL19-CPP. Initialize automatic local variables on declaration
4273OOP50-CPP. Do not invoke virtual functions from constructors or destructors
4274OOP50-CPP. Do not invoke virtual functions from constructors or destructors
4275 OOP50-CPP. Do not invoke virtual functions from constructors or destructors
4276 4261 OOP50-CPP. Do not invoke virtual functions from constructors or destructors
4277 4262 OOP50 MEM51-CPP. Do not invoke virtual functions from constructors or destructors
4278OOP50-CPP. Do not invoke virtual functions from constructors or destructors
4279OOP50-CPP. Do not invoke virtual functions from constructors or destructors
Properly deallocate dynamically allocated resources
4263 MEM51-CPP. Properly deallocate dynamically allocated resources
4264 MEM51-CPP. Properly deallocate dynamically allocated resources
4273 4280 OOP50-CPP. Do not invoke virtual functions from constructors or destructors
4281 4274 OOP50-CPP. Do not invoke virtual functions from constructors or destructors
4282 4275 OOP50-CPP. Do not invoke virtual functions from constructors or destructors
4283DCL13-CPP. Declare function parameters that are pointers to values not changed by the function as const
4400DCL06-CPP. Use meaningful symbolic constants to represent literal values in program logic
destructors
4276 OOP504400EXP07-CPP. Do not diminish the benefits of constants by assuming their values in expressions
4401DCL06-CPP. Use meaningful symbolic constants to represent literal values in program logic
4401EXP07-CPP. Do not diminish the benefits of constants by assuming their values in expressions
4402DCL06-CPP. Use meaningful symbolic constants to represent literal values in program logic
4403DCL06-CPP. Use meaningful symbolic constants to represent literal values in program logic
4404DCL06-CPP. Use meaningful symbolic constants to represent literal values in program logic
4405DCL06-CPP. Use meaningful symbolic constants to represent literal values in program logic
4405EXP07-CPP. Do not diminish the benefits of constants by assuming their values in expressions
4406DCL06-CPP. Use meaningful symbolic constants to represent literal values in program logic
4408DCL06-CPP. Use meaningful symbolic constants to represent literal values in program logic
4409DCL06-CPP. Use meaningful symbolic constants to represent literal values in program logic
4414DCL06-CPP. Use meaningful symbolic constants to represent literal values in program logic
4415DCL06-CPP. Use meaningful symbolic constants to represent literal values in program logic
4610MSC01-CPP. Strive for logical completeness
4611MSC01-CPP. Strive for logical completeness
4625OOP08-CPP. Do not return references to private data
4626OOP08-CPP. Do not return references to private data
4627OOP08-CPP. Do not return references to private data
4628OOP08-CPP. Do not return references to private data
4636ERR50-CPP. Do not call std::terminate(), std::abort(), or std::_Exit()
4637ERR50-CPP. Do not call std::terminate(), std::abort(), or std::_Exit()
Secondary AnalysisINT06-CPP. Use strtol() or a related function to convert a string token to an integer
Secondary AnalysisPRE04-CPP. Do not reuse a standard header file name
invoke virtual functions from constructors or destructors
4277 OOP50-CPP. Do not invoke virtual functions from constructors or destructors
4278 OOP50-CPP. Do not invoke virtual functions from constructors or destructors
4279 OOP50-CPP. Do not invoke virtual functions from constructors or destructors
4280 OOP50-CPP. Do not invoke virtual functions from constructors or destructors
4281 OOP50-CPP. Do not invoke virtual functions from constructors or destructors
4282 OOP50-CPP. Do not invoke virtual functions from constructors or destructors
4303 MEM50-CPP. Do not access freed memory
4304 MEM50-CPP. Do not access freed memory
4631 DCL58-CPP. Do not modify the standard namespaces
4632 MEM52-CPP. Detect and handle memory allocation errors
4632 ERR55-CPP. Honor exception specifications
4634 ERR58-CPP. Handle all exceptions thrown before main() begins executing
4636 ERR58-CPP. Handle all exceptions thrown before main() begins executing
4637 ERR58-CPP. Handle all exceptions thrown before main() begins executing
4639 ERR54-CPP. Catch handlers should order their parameter types from most derived to least derived
4639 ERR58-CPP. Handle all exceptions thrown before main() begins executing
4671 EXP55-CPP. Do not access a cv-qualified object through a cv-unqualified type
4961 CON50-CPP. Do not destroy a mutex while it is locked
4962 CON50-CPP. Do not destroy a mutex while it is locked
5003 DCL51-CPP. Do not declare or define a reserved identifier
5014 ERR50-CPP. Do not abruptly terminate the program
5015 Secondary analysis ERR52-CPP. Do not use setjmp() or longjmp()
5017 OOP57-CPP. Prefer special member functions and overloaded operators to C Standard Library functions
5018 CON51-CPP. Ensure actively held locks are released on exceptional conditions
5019 CON54Secondary analysisDCL09-CPP. Declare Wrap functions that return errno with a return type of errno_tcan spuriously wake up in a loop
5020 CON55-CPP. Preserve thread safety and liveness when using condition variables
5028 Warncall -wc rand MSC50-CPP. Do not use std::rand() for generating pseudorandom numbers
warncall 5038 PRE09 OOP57-CPP. Do not replace secure functions with less secure Prefer special member functions and overloaded operators to C Standard Library functions