From: Steve Peters Date: Sat, 23 Apr 2005 22:37:48 +0000 (-0500) Subject: Add -Wdeclaration-after-statement to default flags for gcc 3+ X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6347b5be6cb41e4de49464a7d96b9e32925ec1ff;p=p5sagit%2Fp5-mst-13.2.git Add -Wdeclaration-after-statement to default flags for gcc 3+ Message-ID: <20050424033748.GA23117@mccoy.peters.homeunix.org> p4raw-id: //depot/perl@24313 --- diff --git a/Configure b/Configure index cd5e7d4..e3dc44f 100755 --- a/Configure +++ b/Configure @@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Mon Apr 11 12:33:25 CEST 2005 [metaconfig 3.0 PL70] +# Generated on Sun Apr 24 14:17:04 CEST 2005 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ <&1 echo 'int main(void) { return 0; }' > gcctest.c - if $cc -O2 -pipe -o gcctest gcctest.c; then + if $cc -pipe -o gcctest gcctest.c; then echo "Yes, it does." 2>&1 case "$ccflags" in *-pipe*) @@ -4757,6 +4757,20 @@ default|recommended) else echo "Nope, it doesn't, but that's ok." 2>&1 fi + + echo "Checking if your compiler accepts -Wdeclaration-after-statement" 2>&1 + echo 'int main(void) { return 0; }' > gcctest.c + if $cc -Wdeclaration-after-statement -o gcctest gcctest.c; then + echo "Yes, it does." 2>&1 + case "$ccflags" in + *-Wdeclaration-after-statement*) + echo "Leaving current flags $ccflags alone." 2>&1 + ;; + *) dflt="$dflt -Wdeclaration-after-statement" ;; + esac + else + echo "Nope, it doesn't, but that's ok." 2>&1 + fi ;; esac ;;