-sizeof()
Jan Ringoš
tringi@mx-3.cz
Thu Nov 18 01:11:00 GMT 2004
Hello, I am not a C++ guru, but this thing looks weird.
I have following two codes:
__int64 a = -4;
printf ("%016I64x\n", a); // prints fffffffffffffffc
__int64 b = -sizeof(int);
printf ("%016I64x\n", b); // prints 00000000fffffffc
Correct me if I am wrong, but shouldn't they return the same value (the first
one)??
I thought that sizeof is evaluated before converting to __int64 (long long)...
... MinGW 3.4.2, Win XP 32-bit ...
---
Jan Ringoš, Tringi@Mx-3.cz
http://Tringi.Mx-3.cz
senior programmer-analyst
n.v.t. MX-3, www.mx-3.cz
More information about the Gcc
mailing list