...
Use of an identifier (within one translation unit) classified as both internally and externally linked causes undefined behavior. See also undefined behavior 8behavior 8 in Appendix J of the C Standard. A translation unit includes the source file together with its headers and all source files included via the preprocessing directive #include
.
...
Tool | Version | Checker | Description | LDRA tool suite|||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
GCC |
| LDRA
| LDRA
| 575 S
| Fully implemented
| Splint|||||||
| Splint
| Splint
| IF_DEF_IN_HEADER_DECL IF_MULTI_DECL |
| ||||||||
| 575 S | Fully implemented | ||||||||||
KlocworkSplint |
| IF_DEF_IN_HEADER_DECL IF_MULTI_DECL |
| |||||||||
PRQA QA-C |
| 0625 (U) | Fully implemented |
...
CERT C++ Secure Coding Standard | DCL36-CPP. Do not declare an identifier with conflicting linkage classifications |
---|---|
MISRA-C | Rule 8.1 (required): Functions shall have prototype declarations and the prototype shall be visible at both the function definition and call |
Bibliography
[Banahan 2003] | Section 8.2, "Declarations, Definitions and Accessibility" |
---|---|
[ISO/IEC 9899:2011] | Section 6.2.2, "Linkages of Identifiers" |
[Kirch-Prinz 2002] |
...