On Tue, 06 May 2008 16:26:19 -0400, Kenneth Brody wrote:
> Note, too, that Mr. van D?k (sorry about the mangling of the name, but
> my newsreader is obviously not UTF-8 compliant)
<OT> It could be that your system font simply doesn't contain the
character, but the newsreader still is UTF-8 compliant. :) </OT>
> says that the standard
> does say that "void *" and "char *" are special cases which must be
> represented the same way. If that is true,
6.2.5p27:
"A pointer to void shall have the same representation and alignment
requirements as a pointer to a character type."
> then your original example
> will "work" as-is, but only because you are converting "char **" to
> "void **".
No, and I had tried to make that explicit. I wrote "you still aren't
allowed to access one as the other anyway (except in special
cir***stances)". Those special cir***stances would be using memcpy or an
union to copy between distinct pointer types. Using *(char **) &p when p
is defined as void *p, or vice versa, is not one of those special
cir***stances, and when you do that, the behaviour is still undefined,
just like the behaviour is undefined if you use *(int **) &p on systems
where int * has the same representation and alignment requirements as
void *.


|