我公司的stdint.h
标题是:
#define INT64_MIN -9223372036854775808LL
但在我项目的一些代码中,一位程序员写道:
#undef INT64_MIN
#define INT64_MIN (-9223372036854775807LL -1)
然后他在代码中使用这个定义。
该项目编译时没有警告/错误。
当我试图删除他的定义并使用默认定义时,我得到了:
error: integer constant is so large that it is unsigned
这两个定义似乎是等价的。
为什么一个编译正常而另一个编译失败?