I am on a 32 bit machine but one of the system interfaces takes a 64
bit value for an address.
Can I (should I) trust g++ and just do something like
char *foo;
unsigned long long n = reinterpret_cast<unsigned long long>(foo);
or should I write a function to do something like:
char *foo;
unsigned long fl = reinterpret_cast<unsigned long>(foo);
unsigned long long n = (x00000000ffffffffLL & fl;
I have two worries: 1) It needs to be a 64 bit result. 2) The upper
32 bits to be zero filled, not sign extended.
Thanks,
Perry