Greg Winton writes:
> void GetAlansConstName (void const** dataP)
`void const**' is exactly equivalent to `const void**' (though, yes, in
some ways it's clearer to humans).
> I believe this declaration should work
> - let me know.
It works, but it doesn't help. Here's another test program:
const char *alan1() { return "Alan"; }
void alan2(const char **p) { *p = "Alan"; }
void f() {
char *s;
const char *cs;
s = alan1(); /* 1 */
alan2(&s); /* 2 */
cs = alan1(); /* 3 */
alan2(&cs); /* 4 */
}
3 and 4 are correct, while 1 and 2 are not. GCC will emit a diagnostic
for both 1 and 2. CodeWarrior will only do so about 1. CodeWarrior is
thus in violation of the ISO C Standard, section 6.3.2.2.
John "end of story"