Amir Saniyan Amir Saniyan - 3 months ago 85
C++ Question

How to enable __int128 on Visual Studio?

When I type

__int128
in a C++ project in Visual Studio, the editor changes color of
__int128
to blue (like keyword).

But when I compile the source, the folowing error appears:

error C4235:
nonstandard extension used : '__int128' keyword not supported on this architecture


How can I enable
__int128
on Visual Studio?

Answer

MSDN doesn't list it as being available, and this recent response agrees, so officially, no, there is no type called __int128 and it can't be enabled.

Additionally, never trust the syntax hilighter; it is user editable, and thus likely to either have bogus or 'future' types in it. (it is probably a reserved word however, due to the error, thus you should avoid naming any types __int128, this follows the convention that anything prefixed with a double underscore should reserved for compiler use).

One would think the __int128 might be available on x64/IPF machines via register spanning, like __in64 is on 32bit targets, but right now the only 128 bit types stem from SIMD types (__m128 and its various typed forms).