Declarations and Initialization (DCL)
- DCL50-CPP. Do not define a C-style variadic function
- DCL51-CPP. Do not declare or define a reserved identifier
- DCL52-CPP. Never qualify a reference type with const or volatile
- DCL53-CPP. Do not write syntactically ambiguous declarations
- DCL54-CPP. Overload allocation and deallocation functions as a pair in the same scope
- DCL55-CPP. Avoid information leakage when passing a class object across a trust boundary
- DCL56-CPP. Avoid cycles during initialization of static objects
- DCL57-CPP. Do not let exceptions escape from destructors or deallocation functions
- DCL58-CPP. Do not modify the standard namespaces
- DCL59-CPP. Do not define an unnamed namespace in a header file
- DCL60-CPP. Obey the one-definition rule
The following rules from the SEI CERT C Coding Standard also apply in C++:
- DCL30-C. Declare objects with appropriate storage durations
- DCL39-C. Avoid information leakage when passing a structure across a trust boundary
- DCL40-C. Do not create incompatible declarations of the same function or object
Information for Editors
To have a new guideline automatically listed above be sure to label it dcl and rule .
Risk Assessment Summary
| Rule | Severity | Likelihood | Detectable | Repairable | Priority | Level |
|---|---|---|---|---|---|---|
| DCL50-CPP | High | Probable | Yes | No | P12 | L1 |
| DCL51-CPP | Low | Unlikely | Yes | No | P2 | L3 |
| DCL52-CPP | Low | Unlikely | Yes | Yes | P3 | L3 |
| DCL53-CPP | Low | Unlikely | Yes | No | P2 | L3 |
| DCL54-CPP | Low | Probable | Yes | No | P4 | L3 |
| DCL55-CPP | Low | Unlikely | No | Yes | P2 | L3 |
| DCL56-CPP | Low | Unlikely | Yes | No | P2 | L3 |
| DCL57-CPP | Low | Likely | Yes | Yes | P9 | L2 |
| DCL58-CPP | High | Unlikely | Yes | No | P6 | L2 |
| DCL59-CPP | Medium | Unlikely | Yes | No | P4 | L3 |
| DCL60-CPP | High | Unlikely | Yes | No | P6 | L2 |


