dtevhgk028372
2015-03-12 09:33 阅读 39
已采纳

编译Go 1.4.2时出现“取消引用类型化指针”错误

I'm compiling Go from source on Windows with MinGW. When running make.bat, I get the following error:

# Building C bootstrap tool.
cmd/dist
cmd/dist/windows.c: In function `errstr`:
cmd/dist/windows.c:119: warning: deferencing type-punned pointer will break strict-aliasing rules

I'm not very experienced with compiling on Windows, and it appears like this issue isn't very common, as Google doesn't return anything for it specific to Go.

Edit 1: Admittedly this is a warning, not an error. However a check in the code if errorlevel 1 goto fail appears to consider this output an error, and stops the progress of the script.

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

1条回答 默认 最新

  • 已采纳
    doujiexi1824 doujiexi1824 2015-03-12 13:18

    Go for Windows uses TDM-GCC, a compiler suite for 32- and 64-bit Windows based on the GNU toolchain.

    For example,

    C:\>gcc --version
    gcc (tdm64-1) 4.9.2
    
    点赞 评论 复制链接分享

相关推荐