Name | Checked | Synopsis |
---|
POR#001
|
 |
Never use absolute file paths |
POR#002
|
|
Do not assume that an int and a long have the same size |
POR#003
|
 |
Do not assume that a char is signed or unsigned |
POR#004
|
 |
Do not cast a pointer to a shorter quantity to a pointer to a longer quantity |
POR#005
|
 |
Do not assume that pointers and integers have the same size |
POR#006
|
 |
Use explicit type conversions for arithmetic using signed and unsigned values |
POR#007
|
|
Do not assume that you know how an instance of a data type is represented in memory |
POR#008
|
|
Do not depend on underflow or overflow functioning in any special way |
POR#009
|
|
Do not assume that longs, floats, doubles or long doubles may begin at arbitrary addresses |
POR#010
|
|
Do not assume that the operands in an expression are evaluated in a definite order, unless the order is specified in the language |
POR#011
|
|
Do not assume that you know how the invocation mechanism for a method or function is implemented |
POR#012
|
|
Do not assume that static objects are initialized in any special order when they are spread over multiple source files |
POR#014
|
|
Do not assume that a short is 16-bits |
POR#015
|
|
Do not assume that a long is 32-bits |
POR#016
|
|
Do not assume that the size of an enumeration is the same for all platforms |
POR#017
|
|
Do not depend on undefined, unspecified, or implementation-defined parts of the language |
POR#018
|
 |
Avoid the use of #pragma directives |
POR#019
|
 |
Header file names shall always be treated as case-sensitive |
POR#020
|
|
Do not make assumptions about the exact size or layout in memory of an object |
POR#021
|
 |
Avoid the use of conditional compilation |
POR#022
|
|
Make sure all conversions from a value of one type to another of a narrower type do not slice off significant data |
POR#023
|
|
Use typedefs or classes to hide the representation of application-specific data types |
POR#024
|
|
Use macros to prevent the use of unsupported keywords |
POR#025
|
 |
Floating point values shall not be compared using the == or != operators |
POR#026
|
|
Only one #include directive should be needed when using a template |
POR#027
|
|
Do not rely on partial instantiation of templates |
POR#028
|
 |
Always return a value from main |
POR#029
|
 |
Do not depend on the order of evaluation of arguments to a function |
POR#030
|
|
Both operands of the remainder operator shall be positive |
POR#031
|
 |
Do not depend on implementation defined behavior of shift operators for built-in types |
POR#032
|
 |
Use nullptr instead of 0 or NULL for a null pointer |
POR#033
|
 |
Do not make assumptions on the size of int |
POR#034
|
 |
Avoid using shift operations instead of arithmetic operations |
POR#035
|
 |
Headers supplied by external libraries go in <> brackets; all other headers go in "" quotes |
POR#036
|
|
If an object is created using a default constructor, then don't use parenthesis in the declaration |
POR#037
|
 |
Avoid the use of #pragma warning directive. |
POR#038
|
|
Make sure that the sizes and types of functions are well-defined if exported to other languages |