...
Syntactically ambiguous declarations can lead to unexpected program execution. However, it is likely that rudimentary testing would uncover violations of this rule.
Rule | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
DCL53-CPP | Low | Unlikely | Medium | P2 | L3 |
Automated Detection
Tool | Version | Checker | Description | ||||||
---|---|---|---|---|---|---|---|---|---|
LDRA tool suite |
| 296 S | Partially implemented | ||||||
Parasoft C/C++test |
| CERT_CPP-DCL53-a | Always declare functions at file scope | ||||||
PRQA QA-C++ |
| 2502, 2510 |
Clang |
| -Wvexing-parse |
SonarQube C/C++ Plugin |
| S3468 |
Related Vulnerabilities
Search for other vulnerabilities resulting from the violation of this rule on the CERT website.
Bibliography
[ISO/IEC 14882-2014] | Subclause 6.8, "Ambiguity Resolution" Subclause 8.2, "Ambiguity Resolution" |
[Meyers 2001] | Item 6, "Be Alert for C++'s Most Vexing Parse" |
...