Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ames!uhccux!munnari.oz.au!cs.mu.oz.au!ok From: ok@cs.mu.oz.au (Richard O'Keefe) Newsgroups: comp.lang.c Subject: Re: Function-types: compatability, and typedefs Message-ID: <2022@munnari.oz.au> Date: 5 Sep 89 03:41:50 GMT References: <19361@mimsy.UUCP> <14511@haddock.ima.isc.com> Sender: news@cs.mu.oz.au Lines: 15 I wrote int cmp(char **s1, char **s2) { return strcmp(*s1, *s2); } flaps@dgp.toronto.edu (Alan J Rosenthal) correct this to int cmp(void *s1, void *s2) { return(strcmp(*(char **)s1, *(char **)s2)); } Karl Heuer pointed out This isn't just a quibble. There are many real machines out there that have more than one pointer format. The code will fail in mysterious ways if you don't declare the formal arguments to be the same type as the actuals. Related but different question: 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?