B
Borked Pseudo Mailed
The cast appears necessary in that case, since you're using
an (int *).
If you were using a (char *), whether the cast is necessary
has been debated. When I pointed out a subclause and footnote
about the interchangeability of (void *) and (char *) - a fact
that I knew wasn't unknown to people on this newsgroup, since
it's been discussed here before - there was talk of the standard
being useless on the point because it had made its intention known
in a non-normative footnote and not the actual body of the standard.
It's a pedantry thing.
For what it's worth, I recommend always using the (void *) cast
for %p, even for (char *), just to be sure.
(I'm assuming you know why those assignments are a bad idea.)
Hope that helps.
Yours,
Han from China
an (int *).
If you were using a (char *), whether the cast is necessary
has been debated. When I pointed out a subclause and footnote
about the interchangeability of (void *) and (char *) - a fact
that I knew wasn't unknown to people on this newsgroup, since
it's been discussed here before - there was talk of the standard
being useless on the point because it had made its intention known
in a non-normative footnote and not the actual body of the standard.
It's a pedantry thing.
For what it's worth, I recommend always using the (void *) cast
for %p, even for (char *), just to be sure.
(I'm assuming you know why those assignments are a bad idea.)
Hope that helps.
Yours,
Han from China