"If a worker wants to do his job well, he must first sharpen his tools." - Confucius, "The Analects of Confucius. Lu Linggong"
Front page > Programming > ## Why Does Visual Studio Highlight __int128 but Fail to Compile It?

## Why Does Visual Studio Highlight __int128 but Fail to Compile It?

Published on 2024-11-07
Browse:846

## Why Does Visual Studio Highlight __int128 but Fail to Compile It?

Troubleshooting __int128 Compatibility in Visual Studio

While Visual Studio's syntax highlighting suggests the availability of the __int128 data type, compilation errors reveal that it is not supported on the current architecture. This issue arises when attempting to utilize this 128-bit integer type in C projects within Visual Studio.

Ursache:

According to the Microsoft Developer Network (MSDN), __int128 is not a supported type on the Visual Studio platform. This contradicts the syntax highlighting, which incorrectly suggests its validity.

Lösung:

Despite the syntax highlighting, the compiler accurately detects the lack of __int128 support. Therefore, it is recommended to refrain from using this data type in Visual Studio projects.

Additional Considerations:

  • Avoid using __int128 as a type name, as it is likely a reserved word due to the compilation error.
  • Recognize that __int128 is not available on x64/IPF architectures through register spanning, unlike __int64 on 32-bit targets.
  • The only 128-bit types currently supported in Visual Studio are SIMD types derived from __m128.
Latest tutorial More>

Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.

Copyright© 2022 湘ICP备2022001581号-3