Forward declarations in function prototypes, yet again
uunet!cwi.nl!Dik.Winter
uunet!cwi.nl!Dik.Winter
Sat Jul 18 07:35:11 PDT 1992
> >the ENTIRE THING is the declaration,and THE ENTIRE THING must be read before
> >we try to interpret any part. The fact that this declaration happens to have
> > some sub-pieces that look like other declarations is not relevant.
> If you're talking about the programming language C, then the above is not
> correct.
One situation where it is clearly incorrect is the following:
int foo(struct x {int i;} t) { return t.i;}
Which is legal (although silly). The parameter declarations *are* in fact
true declarations in ANSI C. (Also in old-style C, but there the declaration
is of type int, but only provisionally, with the option to modify it through
actual specification.)
More information about the Numeric-interest
mailing list