is a void function invocation an expression or a statement?

CS 8 Readers c8-rah at
Thu Aug 14 04:27:53 AEST 1986

I think that I agree that void should be a real data type, but 
making sizeof(void) would create problems.  Since sizeof(void) = 0,
sizeof(void[size) = 0 regardless of size.  Since one could declare an
arbitrarily long array of void, sizeof(void *) would have to be infinite,
which does not seem possible.  My proposed solution, which may not be any
good either, is making void a real type, and sizeof(void) equal to the
sizeof a union of char,int,etc. i.e. sizeof(double).

If anyone has a better idea, or a good reason not to make void a real data
type, I would be interested in hearing it.

                                -Max Schireson

More information about the Comp.lang.c mailing list