首页 > 代码库 > warning: integer constant is too large for 'long' type"
warning: integer constant is too large for 'long' type"
时间 :2014-7-11 11:38 调试iHealthGateway和云通信时发现问题 (时间戳TS)
问题:Linux编译时候定义了一个unint64_t = 1405043216129 (64位unsigned long long int 取值范围之内)
但编译的时候总是出现warning:integer constant is too large for ‘long‘ type"
解决:The warning message can be safely ignored, as mb-gcc is not doing anything wrong; the 64-bit computing is in fact correct.
This warning occurs because gcc is strict in syntax and requires LL on the end of such constants. This warning message disappears if the integer is appended with LL.
Fox:uint64_t Time = 1405043216129LL
pJsonObj = GatewayConfigInfoContent(Time); //该函数是获取网关配置时打包的实体内容,需要参数TS
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。