首页 > 代码库 > 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