X3J11 Pleasanton meeting summary
Colin Plumb
ccplumb at spurge.uwaterloo.ca
Thu Oct 4 02:22:41 AEST 1990
In article <1990Oct2.164709.23887 at zoo.toronto.edu> henry at zoo.toronto.edu (Henry Spencer) 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 */
> Betcha there isn't a compiler on Earth that will accept that today.
> Everyone I know read the size as being needed at the time of the declaration.
Taken. $5.00? Gcc 1.37.1 (VAX):
#include <stdio.h>
struct foo x;
struct foo {
int i;
};
int main()
{
x.i = 5;
printf("++x.i = %d\n", ++x.i);
return 0;
}
when run through gcc -ansi -pedantic -Wall produces a complaint about our
non-ANSI header files (printf returns an int, therefore it isn't defined),
and produces the expected output.
--
-Colin
More information about the Comp.std.c
mailing list