--- a.c ----
int i; // external definition
---- main.c ------
int i=0; // external definition
int main(void)
{
i=0;
}
In both files i
is an external defnition in each translation unit and i
is used in an expression. That should violate:
If an identifier declared with external linkage is used in an expression (other than as part of the operand of a sizeof operator whose result is an integer constant), somewhere in the entire program there shall be exactly one external definition for the identifier; otherwise, there shall be no more than one.140)