Orphaned Response
karl at haddock
karl at haddock
Wed Aug 13 04:09:00 AEST 1986
dg_rtp!throopw (Wayne Throop) writes:
>(As a small nit, I'd druther that the draft standard would allow a void
> expression to be cast to void, but that's a fairly small quibble.)
Void to void is illegal? Sonofagun, you're right, and they even made it
explicit. How strange.
Here's another restriction I just encountered: you can't typedef to void.
This is probably because typedef is syntactically a storage class specifier,
so it "looks like" an attempt to declare a void variable.
I was trying to declare "typedef void dead;" so that I could distinguish
between functions that return nothing (void perror(char *), setbuf(FILE *,
char *), nullf(void)) from those that don't return (dead exit(int),
abort(void), longjmp(jmp_buf, int)). Again, it's a small quibble; I'll
just use #define instead.
Karl W. Z. Heuer (ihnp4!ima!haddock!karl), The Walking Lint
More information about the Comp.lang.c
mailing list