Why is a UINT_MAX 64 bits on 32 bit linux OS?
Linux debianvm 2.6.32-5-686 #1 SMP Sun May 6 04:01:19 UTC 2012 i686 GNU/Linux
This is true: #if UINT_MAX == 0xFFFFFFFFFFFFFFFFULL #error UINT_MAX #endif ? |
I have a feeling it's the preprocessor since they define it as ~0U
it fails this: #if UINT_MAX == 0xFFFFFFFFU but it should be the same. |
Yes, that's what it is, gcc / g++ doesn't handle ~0U as expected since U should make it an unsigned int in the preprocessor (ULL for larger values). That's the way all the other compilers I've used over the years work.
|
All times are GMT -5. The time now is 10:19 PM. |