【发布时间】:2013-06-21 16:43:09
【问题描述】:
最近有人问question ULL 或 LLU 在 C 中指定 unsigned long long 常量是否有效。我知道它们都是有效的,但我认为 ULL 会更好,因为它匹配类型unsigned long long。
但是,我现在不太确定。 gcc 编译器允许以下内容毫无怨言:
int main(void) {
unsigned int a = 1;
int unsigned b = 2;
return 0;
}
所以我的问题是:int unsigned 和 long long unsigned 等其他变体是否符合标准的有效类型?
【问题讨论】: