Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Parasoft C/C++test 10.4.1 update

...

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
Include Page
LDRA_V
LDRA_V

296 S

Partially implemented

Parasoft C/C++test

Include Page
Parasoft_V
Parasoft_V

CERT_CPP-DCL53-a
CERT_CPP-DCL53-b

Always declare functions at file scope
Identifier declared in a local or function prototype scope shall not hide an identifier declared in a global or namespace scope

PRQA QA-C++
Include Page
PRQA QA-C++_V
PRQA QA-C++_V

2502, 2510

 

Clang
Include Page
Clang_V
Clang_V
-Wvexing-parse
 

SonarQube C/C++ Plugin
Include Page
SonarQube C/C++ Plugin_V
SonarQube C/C++ Plugin_V
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"

 


...