#define void int vs. #define void char

Gary M. Samuelson garys at bunker.UUCP
Fri Jul 1 03:59:06 AEST 1988


In article <11823 at mimsy.UUCP> chris at mimsy.UUCP (Chris Torek) writes:
==[but ado was told that] while "#define void char" might be better when
==it comes to pointers, there were other cases where "#define void int"
==was better.

= ...  Had the standard included the line
=	typedef void *pointer_t;	/* or (char *) */
=in <stddef.h>, one could implement pointer_t on old compilers virtually
=painlessly.

=Of course, `void *' does somewhat carry the notion that the pointer
=does not point to anything in particular, or at least not to anything
=concrete.

I've got it !  For the generic pointer type, how about: (noalias *)
Guaranteed not to point to anything in particular!

:-) :-) :-?

Gary Samuelson



More information about the Comp.lang.c mailing list