It was thus said that the Great Viacheslav Usov once stated:
The very first message of mine in this thread explained how having multiple
definitions of external linkage identifiers in an "entire program" is
undefined behaviour, quoting the standard.
That was 6.9#5, which I quoted a portion of, but here's the full quote:
5 An external definition is an external declaration that is also a
definition of a function (other than an inline definition) or an
object. 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.
I'm not reading "undefined behavior" there, I see "error" there. Annex J
of the C99 standard lists all the unspecified, undefined,
implementation-defined and locale-specific behaviors. Nowhere is this
addresses.