diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2014-06-18 09:12:18 -0400 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2014-06-18 14:14:28 -0400 |
commit | 905ccdc7f91759836c9451d6f5684acfa5d9fa67 (patch) | |
tree | 8cd1b2b3bb82157f1b973a05706757d5d475c9d6 | |
parent | fae2e96056d70d1922a44b0166c5c36a43da092d (diff) | |
download | perl-905ccdc7f91759836c9451d6f5684acfa5d9fa67.tar.gz |
-Wextra is the new -W, do not use both.
-rwxr-xr-x | cflags.SH | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -162,7 +162,7 @@ Intel*) ;; # # Is that you, Intel C++? # XXX if -pedantic (or -pedantic-errors!) is ever added, # the -Werror=declaration-after-statement can be removed # since -std=c89 -pedantic implies the -Werror=... -*) for opt in -ansi -std=c89 -W -Wextra \ +*) for opt in -ansi -std=c89 -Wextra -W \ -Werror=declaration-after-statement \ -Wc++-compat -Wwrite-strings do @@ -179,7 +179,17 @@ Intel*) ;; # # Is that you, Intel C++? then case "$opt" in -std*) stdflags="$stdflags $opt" ;; - *) warn="$warn $opt" ;; + *) case "$opt" in + -W) + # -Wextra is the modern form of -W, so add + # -W only if -Wextra is not there already. + case " $warn " in + *-Wextra*) ;; + *) warn="$warn opt" ;; + esac + ;; + *) warn="$warn $opt" ;; + esac esac fi ;; |