]> Cypherpunks repositories - gostls13.git/commitdiff
exit with non-zero status for incompatible pointer type warnings
authorRuss Cox <rsc@golang.org>
Wed, 9 Sep 2009 23:45:23 +0000 (16:45 -0700)
committerRuss Cox <rsc@golang.org>
Wed, 9 Sep 2009 23:45:23 +0000 (16:45 -0700)
R=r
DELTA=9  (7 added, 0 deleted, 2 changed)
OCL=34499
CL=34499

src/quietgcc.bash

index 02a452c0520459edef2b7176a1715af7eadcf9a2..d0476f34598f340b86d73f0d929f9eda5a47a2eb 100755 (executable)
@@ -40,6 +40,13 @@ $gcc -Wall -Wno-sign-compare -Wno-missing-braces \
        -Wno-parentheses -Wno-unknown-pragmas -Wno-switch -Wno-comment \
        "$@" >$tmp 2>&1
 status=$?
-egrep -v "$ignore" $tmp | uniq
-rm -f $tmp
+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