I
icecrime
Hi,
I have a small interrogation concerning pointer to integer conversion:
how is it possible to safely and portably print a memory address ? From
what I understand (according to FAQ 4.14), conversion from pointer to
integral is never never guaranteed. But (correct me if I'm wrong) some
kind of conversion _is_ necessary in order to print the numeric value.
I have taken a look to the gnu libc printf implementation, and it
appears that the void * is being casted into the largest available
integer type. Do I have a standard and portable way to know about this
"largest integer type" ?
Thank you in advance.
I have a small interrogation concerning pointer to integer conversion:
how is it possible to safely and portably print a memory address ? From
what I understand (according to FAQ 4.14), conversion from pointer to
integral is never never guaranteed. But (correct me if I'm wrong) some
kind of conversion _is_ necessary in order to print the numeric value.
I have taken a look to the gnu libc printf implementation, and it
appears that the void * is being casted into the largest available
integer type. Do I have a standard and portable way to know about this
"largest integer type" ?
Thank you in advance.