...
Use of an identifier (within one translation unit) classified as both internally and externally linked causes undefined behavior. See also undefined behavior 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
.
The following table identifies the linkage assigned to an object that is declared twice in a single translation unit.
1st \ 2nd |
| /none/ |
|
---|---|---|---|
| internal | undefined | internal |
/none/ | undefined | external | external |
| undefined | external | external |
Noncompliant Code Example
...