%p and MSC

Karl Heuer karl at haddock.ima.isc.com
Tue Aug 7 05:57:21 AEST 1990


In article <444 at demott.COM> kdq at demott.COM (Kevin D. Quitt) writes:
>Those models with mixed addressing modes (C,M) cause a problem because
>it is impossible for printf to differentiate between code and data
>pointers.

No problem; the ANSI %p format is only intended to handle data pointers cast
to `void *'.  Function pointers, or uncast& data pointers, are beyond the
scope of this format specifier.

>Also, it seems to me that a program that tries to do anything significant
>with %p is probably not really very portable anyway.

Granted.

Karl W. Z. Heuer (karl at kelp.ima.isc.com or ima!kelp!karl), The Walking Lint
________
& Of course one needn't cast an expression which is already `void *', or
  (because of the same-representation clause) `char *'.



More information about the Comp.lang.c mailing list