Path: utzoo!utgpu!water!watmath!clyde!ima!haddock!karl From: karl@haddock.ISC.COM (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: #define void int vs. #define void char Message-ID: <4420@haddock.ISC.COM> Date: 6 Jun 88 16:28:12 GMT References: <8085@elsie.UUCP> <11823@mimsy.UUCP> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Boston Lines: 19 In article <11823@mimsy.UUCP> chris@mimsy.UUCP (Chris Torek) writes: >Indeed, this is the root of an objection I have to the `void *' syntax >for generic pointers. Had the standard included the line > typedef void *pointer_t; /* or (char *) */ >in, one could implement pointer_t on old compilers virtually >painlessly. My temporary workaround is to use "Void *" (note the capital V) for generic pointers. It's easy to make this work on either K&R or ANSI compilers. I chose not to make a non-standard "pointer_t" because "Void *" more closely resembles the "real" syntax, and is easy to fix when I decide that the workaround is no longer necessary. My alternate solution would be to write a PD preprocessor that converts "void *" to "char *", and other similar hacks. (But to be worthwhile it should also handle function prototypes; since this is nontrivial, I haven't done it yet.) Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint