...
Note that it is a common mistake to choose a reserved name (such as _HEADER_H_
or __HEADER_H__
) for the name of the macro used in the include guard. See DCL37-C. Do not declare or define a reserved identifier for more information.
Risk Assessment
Failure to include header files in an include guard can result in unexpected behavior.
...
Tool | Version | Checker | Description | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Astrée |
| multiple include-guard-missing -guard-pragma-once | Fully checked | ||||||||||||||
Axivion Bauhaus Suite |
| CertC-PRE06Partially checked | |||||||||||||||
| CC2.PRE06 | Fully implemented | |||||||||||||||
Helix QAC |
| C0883 | |||||||||||||||
Klocwork |
| MISRA.INCGUARD | |||||||||||||||
LDRA tool suite |
| 243 S | Fully implemented | ||||||||||||||
Parasoft C/C++test | 9.5 | PFO-02 | Fully implemented | PRQA QA-C | |||||||||||||
Include Page | PRQA QA-C_v | PRQA QA-C_v |
| CERT_C-PRE06-a | Use multiple include guards | ||||||||||||
PC-lint Plus |
| 967 | Fully supported | ||||||||||||||
Polyspace Bug Finder |
| CERT C: Rec. PRE06-C | Checks for content of header file not guarded from multiple inclusions (rec. fully covered) | 0883 | Fully implemented | ||||||||||||
RuleChecker |
| multiple include-guard-missing -guard-pragma-once | Fully Partially checked |
Related Vulnerabilities
...