Compiling go with gcc-4.8 fails with: cmd/cc /var/tmp/portage/dev-lang/go-1.0.3/work/go/src/cmd/cc/funct.c: In function 'dclfunct': /var/tmp/portage/dev-lang/go-1.0.3/work/go/src/cmd/cc/funct.c:273:13: error: iteration 94u invokes undefined behavior [-Werror=aggressive-loop-optimizations] f->sym[o] = S; ^ /var/tmp/portage/dev-lang/go-1.0.3/work/go/src/cmd/cc/funct.c:272:2: note: containing loop for(o=0; o<sizeof(f->sym); o++) ^ cc1: all warnings being treated as errors Trivial patch: --- src/cmd/dist/build.c.orig 2013-04-08 10:17:46.454167764 +0200 +++ src/cmd/dist/build.c 2013-04-08 10:16:59.797104639 +0200 @@ -380,6 +380,7 @@ "-Wall", "-Wno-sign-compare", "-Wno-missing-braces", + "-Wno-aggressive-loop-optimizations", "-Wno-parentheses", "-Wno-unknown-pragmas", "-Wno-switch", also attached in the next comment. Reproducible: Always
Created attachment 344798 [details, diff] patch to compile go-1.0.3 with gcc-4.8
Created attachment 344906 [details, diff] Better patch.
The patch to remove -Werror was applied; this should be fixed. Thanks for the report, and thanks, Ryan, for the patch. :-)