is a void function invocation

karl at haddock karl at haddock
Mon Aug 18 08:47:00 AEST 1986


zircon!c8-rah (Max Schireson) writes:
>Since one could declare an arbitrarily long array of void, sizeof(void *)
>would have to be infinite, which does not seem possible.

Since the "arbitarily long array" has total size zero, there's no problem.
In fact, the compiler could store all void "objects" at the same address,
and "void *" itself -- having only one value -- could have size zero.

Part of the problem here, I think, is that (in X3J11) the keyword "void" now
has three meanings: "void f()" or "(void)e", "void *", and "f(void)".  The
second meaning is based on the assumption that you can't have a pointer to a
real void, and the third assumes that void expressions cannot be function
arguments.  If you want to make void a full-fledged datatype, you'd better
use a different syntax for the other two meanings.

Karl W. Z. Heuer (ihnp4!ima!haddock!karl), The Walking Lint



More information about the Comp.lang.c mailing list