From: Paul Green Date: Sun, 18 Jun 2006 19:41:50 +0000 (-0400) Subject: RE: [PATCH] cflags.SH: rework the gcc warnings selection X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ec2577303395c0e08a228d8fee07de97b4765560;p=p5sagit%2Fp5-mst-13.2.git RE: [PATCH] cflags.SH: rework the gcc warnings selection From: "Green, Paul" Message-ID: p4raw-id: //depot/perl@28402 --- diff --git a/cflags.SH b/cflags.SH index ab79c98..7cb593b 100755 --- a/cflags.SH +++ b/cflags.SH @@ -181,12 +181,14 @@ Intel*) ;; do case " $ccflags " in *"-W$opt "*) ;; - *) case "`echo | $cc -W$opt -E - 2>&1`" in + *) case "`echo >_cflags.c | $cc -W$opt -c _cflags.c -o _cflags.o 2>&1`" in *"unrecognized"*) ;; + *"Invalid"*) ;; *) warn="$warn -W$opt" ;; esac ;; esac + rm -f _cflags.c cflags.o done ;; esac