...
Microsoft Visual Studio 2013 issues no warnings about this code, even at the highest diagnostic levels.
The GCC compiler generates a fatal diagnostic GCC and Clang 14 both generate fatal diagnostics for the conflicting definitions of i2
and i5
.
...
Tool | Version | Checker | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Astrée |
| static-function-declaration static-object-declaration | Partially checked | ||||||||||||
Axivion Bauhaus Suite |
| CertC-DCL36 | Fully implemented | ||||||||||||
CodeSonar |
| LANG.STRUCT.DECL.NOEXT | Missing External Declaration | ||||||||||||
Coverity |
| PW.LINKAGE_CONFLICT | Implemented | ||||||||||||
| CC2.DCL36 | Fully implemented | |||||||||||||
GCC |
| ||||||||||||||
Helix QAC |
| C0625 | Fully implemented | ||||||||||||
Klocwork |
| MISRA.FUNC.STATIC.REDECL | Fully implemented | ||||||||||||
LDRA tool suite |
| 461 S, 575 S, 2 X | Fully implemented | ||||||||||||
PC-lint Plus |
| 401, 839, 1051 | Fully supported | ||||||||||||
Splint |
| ||||||||||||||
Parasoft C/C++test |
| CERT_C-DCL36-a | Identifiers shall not simultaneously have both internal and external linkage in the same translation unit | ||||||||||||
Polyspace Bug Finder |
| MISRA CERT C: 2012 Rule 8.2 | Function types shall be in prototype form with named parameters A compatible declaration shall be visible when an object or function with external linkage is defined The static storage class specifier shall be used in all declarations of objects and functions that have internal linkage A function shall not be declared implicitly | PRQA QA-C | |||||||||||
Include Page | PRQA QA-C_v | PRQA QA-C_v | Checks for inconsistent use of static and extern in object declarations (rule partially covered) | ||||||||||||
0625 (U) | Fully implemented | RuleChecker |
| static-function-declaration static-object-declaration | Partially checked | ||||||||||
TrustInSoft Analyzer |
| non-static declaration follows static declaration | Partially verified. |
Related Vulnerabilities
Search for vulnerabilities resulting from the violation of this rule on the CERT website.
Related Guidelines
Key here (explains table format and definitions)
...