X3J11 Pleasanton meeting summary
James Jones
jejones at mcrware.UUCP
Thu Oct 4 03:36:03 AEST 1990
In article <13996 at smoke.BRL.MIL> gwyn at smoke.BRL.MIL (Doug Gwyn) writes:
> struct foo x;
> struct foo { int i; };
> /* the above is strictly conforming; incomplete-type objects can
> be defined, so long as by the end of the translation unit the
> type becomes complete so that storage can then be allocated */
Gee. This seems to me to be rather inconsistent with other constraints
placed on C that appear to have as their justification allowing straight-
forward one-pass compilation. Would it really be permissible to have
struct foo;
woof()
{
struct foo x;
/* ... */
}
/* ...eventually, at the end of the source file... */
struct foo {
int i;
};
for example? Can one refer to fields in incomplete structures as long
as they occur in a complete declaration that appears by translation
unit's end?
James Jones
More information about the Comp.std.c
mailing list