diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2014-11-24 19:13:05 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2014-11-24 19:13:43 -0500 |
commit | bf78513fd9ba938ecdb1dcbf1ec2d3912924749b (patch) | |
tree | 66239cedc0980c10f3890a2311e30033bd560abe /cflags.SH | |
parent | fd9d4a0b0b9647f6fa78f27c2d0ded19ddd76fa0 (diff) | |
download | perl-bf78513fd9ba938ecdb1dcbf1ec2d3912924749b.tar.gz |
Prefer -std=c89 over -ansi.
Diffstat (limited to 'cflags.SH')
-rwxr-xr-x | cflags.SH | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -182,9 +182,11 @@ Intel*) ;; # # Is that you, Intel C++? # longer then the ANSI minimum of 509 bytes. # # NOTE 3: the relative order of these options matters: -# -Wextra before -W, and -pedantic* before -Werror=d-a-s. +# -Wextra before -W +# -std=c89 before -ansi +# -pedantic* before -Werror=d-a-s # -*) for opt in -ansi -std=c89 $pedantic \ +*) for opt in -std=c89 -ansi $pedantic \ -Werror=declaration-after-statement \ -Wextra -W \ -Wc++-compat -Wwrite-strings @@ -213,6 +215,17 @@ Intel*) ;; # # Is that you, Intel C++? echo "cflags.SH: Adding $opt." stdflags="$stdflags $opt" ;; + -ansi) + # -std=c89 is the modern form of -ansi, so add + # -ansi only if -std=c89 is not there already. + case " $stdflags " in + *-std=c89*) ;; + *) + echo "cflags.SH: Adding $opt." + stdflags="$stdflags $opt" + ;; + esac + ;; *) case "$opt" in -W) # -Wextra is the modern form of -W, so add |