文字类型:0x1ull VS 0x1llu [英] Literal types: 0x1ull vs 0x1llu

查看:2365
本文介绍了文字类型:0x1ull VS 0x1llu的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 GCC 编译器可以让我定义为unsigned long long(即64位)的文字为

My gcc compiler allows me to define an unsigned long long (i.e. 64-bit) literal as

#define A_LITERAL 0x1ull

--- ---或

--- or ---

#define A_LITERAL 0x1llu

有两种文字语句之间的任何差别。这种常见的是其它C编译器?

Is there any difference between these two literal statements. Is this common to other C compilers?

推荐答案

两者都是由C标准(第6.4.4.1)允许的。

Both are allowed by the C standard (section 6.4.4.1).

无符号的后缀 U 可之前或长(或long long(<$ C $之后C> LL ))后缀。

The unsigned suffix u can be before or after the long l (or long long (ll)) suffix.

这篇关于文字类型:0x1ull VS 0x1llu的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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