On 27/04/2007, at 2:50 AM, Joseph S. Myers wrote:
On Fri, 26 Apr 2007, Geoffrey Keating wrote:This seems reasonable to me, but maybe it would be simpler to write If there are one or more incomplete structure or union types which cannot all be completed without producing undefined behaviour, the behaviour is undefined. if that gives the same effect (which I think it does)?That suffers somewhat from the vagueness that afflicts this area (what rearrangements of translation units are permitted in completing the types?).
I wasn't thinking that the completion would necessarily be able to be written in the translation unit, just that there would be some possible completion.
I considered some other examples and decided that what I wantedwas unifiability even in some cases that don't involve incomplete types.For example: // TU 1 void f (void) { struct s { int a; }; extern struct s a, b; } void g (void) { struct s { int a; }; extern struct s c, d; } // TU 2 void h (void) { struct s { int a; }; extern struct s a, c; } void i (void) { struct s { int a; }; extern struct s b, d; }Here, each object individually has compatible types in the two translation units - but "a" and "b" have compatible complete types within TU 1, butincompatible complete types withing TU 2.
Hmm. That makes sense to me, so I agree your wording is better; but please please make sure that this example (and the other one from the original DR) gets into a footnote or an example or at least the rationale.
smime.p7s
Description: S/MIME cryptographic signature