Why will INTEGRAL_MAX_BITS ever return less than 64?

I am trying to figure out what values ​​I can expect for a windows macro _INTEGRAL_MAX_BITS

.
MSDN __ int64 documentation says this code should be used when using__int64

#if defined (_INTEGRAL_MAX_BITS) && \
      _INTEGRAL_MAX_BITS >= 64
    typedef signed __int64 int64;
    typedef unsigned __int64 uint64;
#else
    #error __int64 type not supported
#endif

      

Why would I ever see a value below 32 for INTEGRAL_MAX_BITS

? The answers to this question show that on 32-bit Windows, it long long

is 64 bits. VS2013 documentation states that

_INTEGRAL_MAX_BITS - Reports the maximum size (in bits) of an integral type as an integer literal.

Since it long long

is an integral type, the lowest value that should be returned, even on 32-bit Windows, is 64 bits, right?
Why is a _INTEGRAL_MAX_BITS >= 64

part required #if

?

+3


source to share


1 answer


This documentation is for Visual Studio 6.0. Visual Studio 6.0 was released in 1998, which was before anyone long long

was standardized and didn't support it. It supported __int64

what you see in the documentation, so it could be used unconditionally, but the test _INTEGRAL_MAX_BITS

is probably not getting a better error message even for older versions of Visual Studio. "__int64 type not supported" is a helpful error message. Something like "syntax error before unexpected token" int64 "is not a useful error message.



+5


source







All Articles