From c485b5891273c62af8e2342c72edf717966d97b7 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Fri, 19 Jul 2013 19:36:15 -0400 Subject: [PATCH] cmd/dist, cmd/go: enable more warnings, make clang errors legible This does not change the default compiler on OS X to clang. It appears that for now we can keep using gcc as long as we enable a few more warning settings that are on-by-default elsewhere. R=golang-dev, bradfitz, dave CC=golang-dev https://golang.org/cl/11610044 --- src/cmd/dist/build.c | 6 ++++++ src/cmd/dist/unix.c | 2 ++ src/cmd/go/build.go | 4 +++- src/cmd/go/env.go | 3 +++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/cmd/dist/build.c b/src/cmd/dist/build.c index ba32d3e69b3d5..f99aaa3c93399 100644 --- a/src/cmd/dist/build.c +++ b/src/cmd/dist/build.c @@ -407,12 +407,16 @@ static char *proto_gccargs[] = { // native Plan 9 compilers don't like non-standard prototypes // so let gcc catch them. "-Wstrict-prototypes", + "-Wextra", + "-Wunused", + "-Wuninitialized", "-Wno-sign-compare", "-Wno-missing-braces", "-Wno-parentheses", "-Wno-unknown-pragmas", "-Wno-switch", "-Wno-comment", + "-Wno-missing-field-initializers", "-Werror", "-fno-common", "-ggdb", @@ -620,6 +624,8 @@ install(char *dir) for(i=0; i