Contents
Table of Contents |
---|
This coding standard is organized into 11 chapters containing rules in specific topic areas followed by five appendices. Appendix A contains the bibliography. Appendix B lists the definitions of terms used throughout the standard. Appendix C lists the analyzers that claim to support checking for conformance to the rules. Appendix D lists the relationships between rules. Appendix E lists the Risk Assessments associated with all of the rules in the coding standard.
...
- A three-letter mnemonic representing the section of the standard
- A two-digit numeric value in the range of 00 to 99
- The letters CPP indicating that this is a C++ language guidelineA suffix that represents the associated language or platform. For the CERT C++ Coding Standard, the suffix is CPP.
The three-letter mnemonic can be used to group similar coding practices and to indicate to which category a coding practice belongs.
The numeric value is used to give each coding practice a unique identifier. Numeric values in the range of 00 to 49 are reserved for recommendations, and values in the range of 50 to 99 are reserved for rules. (The values used for the CERT C coding standard are different. It uses 00-29 for recommendations and 30-99 for rules.) Rules and recommendations are frequently referenced from the rules guidelines in this standard by their identifier and title.
Supported Languages and Platforms
See the table below for a summary of supported languages and platforms:
Suffix | Language/Platform |
-C | C |
-CPP | C++ |
-J | Java |
-PL | Perl |
Examples
Here are some example identifiers with an explanation of each:
INT50-CPP Do not cast to an out-of-range enumeration value
This identifier indicates a recommendation
“INT” stands for the Integer category
“50” is the unique identifier
“-CPP” stands for the C++ language
EXP00-J Do not ignore values returned by methods
This identifier indicates a rule
“EXP” stands for the Expressions category
“00” is the unique identifier
“-J” stands for the Java language
FLP00-C. Understand the limitations of floating-point numbers
This identifier indicates a recommendation
“FLP” stands for the Floating Point category
“00” is the unique identifier
“-C” stands for the C programming language
Noncompliant Code Examples and Compliant Solutions
...