On Mon, 8 Mar 2004, Mark Mitchell wrote:
are valid whether within one translation unit or across two. But, you
cannot complete the same structure type in two different ways in the
same translation unit. The idea that in C you could not validly combine
all your translation units into a single translation unit (with
appropriate alpha-renaming of things with internal linkage, and with
appropriate merger of tentative definitions, if you've adopted that
(optional) behavior) is, to me, in contradiction with the spirit of the
language requiring declarations to have compatible types across
translation units.
As far as I know you can combine translation units. Any object or
function must have compatible complete type in all translation units. It
may, however, be necessary to split up named structure or union types into
several separate such named types, one for each incompatible completion of
that type, but each object or function defined using such a type can be
unambiguously assigned at most one completion (otherwise there is
undefined behavior).