Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!ico!ism780c!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.std.c Subject: void* = char* (was: Function-types: compatability, and typedefs) Message-ID: <14555@haddock.ima.isc.com> Date: 8 Sep 89 20:00:24 GMT References: <19361@mimsy.UUCP> <14511@haddock.ima.isc.com> <2022@munnari.oz.au> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Followup-To: comp.std.c Organization: Interactive Systems, Cambridge, MA 02138-5302 Lines: 16 In article <2022@munnari.oz.au> ok@cs.mu.oz.au (Richard O'Keefe) writes: > I believe that the draft standard requires void* and char* to have the > same representation. I understand that this doesn't mean that char* > and char** will be the same, or that void* and char** will be the same, > but will void** and char** be the same? This sounds like a good question for the `Interpretations' phase of X3J11's existence. (I'm redirecting this thread to comp.std.c.) I think the answer has to be Yes, since the reason for the requirement is to force compatibility between ANSI libraries and pre-ANSI programs that explicitly declare functions with `char *' rather than `void *'. The same logic would seem to require `void **' to have the same representation as `char **', at least if there are any library functions that use this type, but I don't think I can prove it by quoting the letter of the Standard. Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint