哪些gcc版本支持__int128内部类型? [英] What gcc versions support the __int128 intrinsic type?
问题描述
在 gcc docs 128位整数下是:
作为一个扩展,整数标量类型
__ int128
被支持用于具有足够整数模式足以容纳128位的目标。
对于一个有符号的128位整数,或者unsigned __int128
,只需为__ int128
写一个无符号的128位整数。
As an extension the integer scalar type
__int128
is supported for targets which have an integer mode wide enough to hold 128 bits. Simply write__int128
for a signed 128-bit integer, orunsigned __int128
for an unsigned 128-bit integer.
GCC没有支持为>长的目标表示
There is no support in GCC for expressing an integer constant of type __int128
for targets with
long long integer less than 128 bits wide.
我想知道哪个gcc版本增加了对这种类型的支持,或者如果有一个宏可以直接用于测试它的存在。
I was wondering what gcc version added support for this type, or if there's a macro that can be used directly to test for its existence.
推荐答案
不确定第一个版本,但您可以测试 __ SIZEOF_INT128 __
宏 - 这是(通常) 16
如果已定义。
Not sure about the first version, but you can test for the __SIZEOF_INT128__
macro - which is (typically) 16
if defined.
这篇关于哪些gcc版本支持__int128内部类型?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!