...
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 Partially checked | |||||||||||||
Axivion Bauhaus Suite |
| CertC-PRE06 | ||||||||||||||
| CC2.PRE06 | Fully implemented | ||||||||||||||
Helix QAC |
| C0883 | ||||||||||||||
Klocwork |
| MISRA.INCGUARD | ||||||||||||||
LDRA tool suite |
| 243 S | Fully implemented | |||||||||||||
Parasoft C/C++test |
| 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) | PRQA QA-C | Include Page | | PRQA QA-C_v | PRQA QA-C_v0883 | Fully implemented | |||||||
RuleChecker |
| multiple include-guard-missing -guard-pragma-once | Fully Partially checked |
Related Vulnerabilities
...