Open AtomicVar opened 1 year ago
I tried to inspect the address of an variable x with:
x
int x = 42; &x
It showed:
@0x7ffc383a5a88
But if I use printf to print the address, the result is different:
printf
printf("&x=%p\n", &x)
&x=0x7f69a0a6c0e0
If you create another int y and print its address with &y, it' the same with &x!
int y
&y
&x
int y = 99; &y
Seems like printing an address with &x is not working. Why?
Thanks for reporting. I think we are missing an overload of mime renderer for pointers, and thus it print the address of an internal object.
I tried to inspect the address of an variable
x
with:It showed:
But if I use
printf
to print the address, the result is different:It showed:
If you create another
int y
and print its address with&y
, it' the same with&x
!It showed:
Seems like printing an address with
&x
is not working. Why?