weixin_39725756
weixin_39725756
2020-11-22 02:12

[master] Ignore warning "-Wplacement-new".

When compiling MXNet, this use of any generates a lot of warnings. This pragma temporarily disables this warning for GCC.

该提问来源于开源项目:dmlc/dmlc-core

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

6条回答

  • weixin_39988930 weixin_39988930 5月前

    hmm, mind push a followup that does framework detection? Or cplusplus_version detection to switch to experimental/any.h?

    点赞 评论 复制链接分享
  • weixin_39725756 weixin_39725756 5月前

    looks like older version of gcc does not have this error and thus cannot disable it. i'll see what i can do

    点赞 评论 复制链接分享
  • weixin_39725756 weixin_39725756 5月前

    Any comment?

    点赞 评论 复制链接分享
  • weixin_39725756 weixin_39725756 5月前

    I use GCC 6 and I get screens of warnings compiling MXNet. I found two major sources. There are some others as well in operator implementation, mainly comparing signedness. I did not bother to correct those.

    点赞 评论 复制链接分享
  • weixin_39988930 weixin_39988930 5月前

    One thing we can try is to switch to experimental/any when it is avaliable (c++14)

    点赞 评论 复制链接分享
  • weixin_39640024 weixin_39640024 5月前

    I find this PR causes the warning here http://ec2-52-25-96-65.us-west-2.compute.amazonaws.com/blue/organizations/jenkins/mxnet/detail/PR-5946/1/pipeline

    
    /workspace/dmlc-core/include/dmlc/././any.h:186:32: error: unknown option after '#pragma GCC diagnostic' kind [-Werror=pragmas]
    
    点赞 评论 复制链接分享