void* = char* (was: Function-types: compatability, and typedefs)
Karl Heuer
karl at haddock.ima.isc.com
Sat Sep 9 06:00:24 AEST 1989
In article <2022 at munnari.oz.au> ok at 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 at haddock.isc.com), The Walking Lint
More information about the Comp.std.c
mailing list