Hello iant (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
LGTM I assume you're just preserving this code for some possible later use, because right now it looks like REGARG is always -1. Ian rsc@golang.org writes: > Reviewers: iant, > > Message: > Hello iant (cc: golang-dev@googlegroups.com), > > I'd like you to review this change to > https://go.googlecode.com/hg/ > > > Description: > build: use gcc -Werror > > Better to fix the warnings that we find. > > Please review this at http://codereview.appspot.com/4406042/ > > Affected files: > M src/cmd/5c/txt.c > M src/cmd/6c/txt.c > M src/cmd/8c/txt.c > M src/quietgcc.bash > > > Index: src/cmd/5c/txt.c > =================================================================== > --- a/src/cmd/5c/txt.c > +++ b/src/cmd/5c/txt.c > @@ -400,6 +400,10 @@ > void > regaalloc1(Node *n, Node *nn) > { > + if(REGARG < 0) { > + fatal(n, "regaalloc1 and REGARG<0"); > + return; > + } > nodreg(n, nn, REGARG); > reg[REGARG]++; > curarg = align(curarg, nn->type, Aarg1, nil); > Index: src/cmd/6c/txt.c > =================================================================== > --- a/src/cmd/6c/txt.c > +++ b/src/cmd/6c/txt.c > @@ -436,8 +436,10 @@ > void > regaalloc1(Node *n, Node *nn) > { > - if(REGARG < 0) > - diag(n, "regaalloc1 and REGARG<0"); > + if(REGARG < 0) { > + fatal(n, "regaalloc1 and REGARG<0"); > + return; > + } > nodreg(n, nn, REGARG); > reg[REGARG]++; > curarg = align(curarg, nn->type, Aarg1, nil); > Index: src/cmd/8c/txt.c > =================================================================== > --- a/src/cmd/8c/txt.c > +++ b/src/cmd/8c/txt.c > @@ -397,6 +397,10 @@ > void > regaalloc1(Node *n, Node *nn) > { > + if(REGARG < 0) { > + fatal(n, "regaalloc1 and REGARG<0"); > + return; > + } > nodreg(n, nn, REGARG); > reg[REGARG]++; > curarg = align(curarg, nn->type, Aarg1, nil); > Index: src/quietgcc.bash > =================================================================== > --- a/src/quietgcc.bash > +++ b/src/quietgcc.bash > @@ -35,15 +35,10 @@ > tmp=/tmp/qcc.$$.$USER.out > $gcc -Wall -Wno-sign-compare -Wno-missing-braces \ > -Wno-parentheses -Wno-unknown-pragmas -Wno-switch -Wno-comment \ > + -Werror \ > "$@" >$tmp 2>&1 > status=$? > egrep -v "$ignore" $tmp | uniq | tee $tmp.1 > > -# Make incompatible pointer type "warnings" stop the build. > -# Not quite perfect--we should remove the object file--but > -# a step in the right direction. > -if egrep 'incompatible pointer type' $tmp.1 >/dev/null; then > - status=1 > -fi > rm -f $tmp $tmp.1 > exit $status
PTAL (added peep.c files) > I assume you're just preserving this code for some possible later use, > because right now it looks like REGARG is always -1. Yes. (You never know...) Russ
LGTM
*** Submitted as http://code.google.com/p/go/source/detail?r=ffae8b88f004 *** build: use gcc -Werror Better to fix the warnings that we find. R=iant CC=golang-dev http://codereview.appspot.com/4406042