warning: left shift count >= width of type

来源:互联网 发布:windows不能访问samba 编辑:程序博客网 时间:2024/05/22 00:04

Linux 64位机器上编译 1<<62,编译提示:warning: left shift count >= width of type

在64位机器上1分配Int类型(4字节)。

错误修改:

1UL << 62 指定1为8字节整数,因此可以解决该问题。

在64位机器上以下类型字的长度

类型长度(字节)int4unsigned int4long8unsigned long8long unsigned int8double8

0 0
原创粉丝点击