64位Fedora运行32位C++程序中int精度溢出处理

在64-bit机器中编译32-bit的代码出现int(强制转换而至)精度溢出:

Debug:

 error: cast from ‘void*’ to ‘int’ loses precision 

Solution:

修改数据类型:将int -->intptr_t

Reference:

http://stackoverflow.com/questions/2024895/how-should-i-handle-cast-from-void-to-int-loses-precision-when-compiling-3

posted @ 2011-09-08 18:49  wang-chd  阅读(428)  评论(0编辑  收藏  举报