【发布时间】:2011-12-21 03:20:18
【问题描述】:
我尝试在 Ubnutu 9.10 上使用 C 语言定义一个 64 位宽度的整数。 9223372036854775808 是 2^23
long long max=9223372036854775808
long max=9223372036854775808
当我编译它时,编译器给出了警告信息:
binary.c:79:19: warning: integer constant is so large that it is unsigned
binary.c: In function ‘bitReversal’:
binary.c:79: warning: this decimal constant is unsigned only in ISO C90
binary.c:79: warning: integer constant is too large for ‘long’ type
long类型是64位宽吗?
最好的问候,
【问题讨论】:
-
你是在 64 位模式下编译吗?
-
9223372036854775808 == 2**63,但最大的 64 位有符号整数比它小一。
标签: c