H5W3
当前位置:H5W3 > go > 正文

【go】go1.3更新:cc1: all warnings being treated as errors

/home/demo/go/src/cmd/8l/optab.c:965:2: error: excess elements in scalar initializer [-Werror]
/home/demo/go/src/cmd/8l/optab.c:965:2: error: (near initialization for ‘optab[452]’) [-Werror]
/home/demo/go/src/cmd/8l/optab.c:965:2: error: excess elements in scalar initializer [-Werror]
/home/demo/go/src/cmd/8l/optab.c:965:2: error: (near initialization for ‘optab[452]’) [-Werror]
/home/demo/go/src/cmd/8l/optab.c:966:2: error: braces around scalar initializer [-Werror]
/home/demo/go/src/cmd/8l/optab.c:966:2: error: (near initialization for ‘optab[453]’) [-Werror]
/home/demo/go/src/cmd/8l/optab.c:966:2: error: excess elements in scalar initializer [-Werror]
/home/demo/go/src/cmd/8l/optab.c:966:2: error: (near initialization for ‘optab[453]’) [-Werror]
/home/demo/go/src/cmd/8l/optab.c:966:2: error: excess elements in scalar initializer [-Werror]
…..
./all.bash 过一会儿就这样了,然后就是
cc1: all warnings being treated as errors
go tool dist: FAILED: gcc -Wall -Wstrict-prototypes -Wextra -Wunused -Wno-sign-compare -Wno-missing-braces -Wno-parentheses -Wno-unknown-pragmas -Wno-switch -Wno-comment -Wno-missing-field-initializers -Werror -fno-common -ggdb -pipe -Wuninitialized -O2 -fmessage-length=0 -c -m32 -I /home/demo/go/include -I /home/demo/go/src/cmd/8l -o $WORK/optab.o /home/demo/go/src/cmd/8l/optab.c

google一下,说是GCC的 -Werror 参数问题。然后,我把make.bash里面gcc的-Werror参数去掉,然后 ./all.bash 还是同样的错误。

回答

本文地址:H5W3 » 【go】go1.3更新:cc1: all warnings being treated as errors

评论 0

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址