<<
Extended one-definition rule
>>
Such inconsistencies are rare, but may happen.
C++'s
one-definition rule
requires that if two compilation units see definitions of the "same" name, they must be token-by-token equivalent.
"Extended one-definition rule":
In a "well-behaved program" -
a shared definition is defined in a single location in a header file;
the "meaning" of that definition does not change between compilation units.
We optimize for this assumption, but must tolerate violations.
Bonus: Can warn about violations, which are probably unintended.