哪些gcc版本支持__int128内部类型? [英] What gcc versions support the __int128 intrinsic type?

查看:835
本文介绍了哪些gcc版本支持__int128内部类型?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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, or unsigned __int128 for an unsigned 128-bit integer.

GCC没有支持为>长的目标表示 __ int128 类型的整数常量

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆