diff options
author | Steve Peters <steve@fisharerojo.org> | 2005-04-23 17:37:48 -0500 |
---|---|---|
committer | H.Merijn Brand <h.m.brand@xs4all.nl> | 2005-04-24 11:52:03 +0000 |
commit | 6347b5be6cb41e4de49464a7d96b9e32925ec1ff (patch) | |
tree | 2d8362ce914728f057e99ba76530d04598ec2561 /Configure | |
parent | 7dbf5f4e6069c22d26a7471f2237d212d602f47c (diff) | |
download | perl-6347b5be6cb41e4de49464a7d96b9e32925ec1ff.tar.gz |
Add -Wdeclaration-after-statement to default flags for gcc 3+
Message-ID: <20050424033748.GA23117@mccoy.peters.homeunix.org>
p4raw-id: //depot/perl@24313
Diffstat (limited to 'Configure')
-rwxr-xr-x | Configure | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -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$$ <<EOF @@ -4746,7 +4746,7 @@ default|recommended) ?*) echo " " echo "Checking if your compiler accepts -pipe" 2>&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 ;; |