efopen.c (about void voids)

Doug Gwyn <gwyn> gwyn at brl-tgr.ARPA
Sat Oct 26 22:42:16 AEST 1985

> Although I am sure that someone has a compiler for which the following will
> not make sense, in general the construct
> #ifndef lint
> #define void int
> #endif
> allows one to have one's cake and eat it too.

Not always, since this introduces a mismatch between the
application code and the C library.  There may also be
compilers that get unhappy when your int-valued functions
don't return a value, etc.  The #define void int kludge
should really only be applied when the compiler doesn't
know about void.

More information about the Comp.lang.c mailing list