C oddity
utzoo!decvax!harpo!floyd!vax135!ariel!houti!lime!burdvax!psuvax!sibley
utzoo!decvax!harpo!floyd!vax135!ariel!houti!lime!burdvax!psuvax!sibley
Fri Jan 21 14:48:26 AEST 1983
In answer to why
double a; b, c, d;
is not flagged as an error: K&R p. 208 discusses implicit declarations
and gives some examples, but does not say these examples are the only ones
allowed. It is not entirely unreasonable that the above is an implicit
declaration of b, c, and d as static int's (or auto int's if inside a
function definition). This would require 4 bytes each on a VAX, as
reportedly does happen. Perhaps the Ritchie compiler assumes them to be
external, so does not allocate space or flag an error. However, the
loader should complain about unresolved external references if this is
the case.
Dave Sibley
Department of Mathematics
Penn State University
psuvax!sibley
More information about the Comp.lang.c
mailing list