This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
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 considered some other examples and decided that what I wanted
was 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, but
incompatible complete types withing TU 2.
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |