In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/bf78513fd9ba938ecdb1dcbf1ec2d3912924749b?hp=89c7093464f07bc6732b2214dcfc332d703e8fa9>
- Log ----------------------------------------------------------------- commit bf78513fd9ba938ecdb1dcbf1ec2d3912924749b Author: Jarkko Hietaniemi <[email protected]> Date: Mon Nov 24 19:13:05 2014 -0500 Prefer -std=c89 over -ansi. M cflags.SH commit fd9d4a0b0b9647f6fa78f27c2d0ded19ddd76fa0 Author: Jarkko Hietaniemi <[email protected]> Date: Mon Nov 24 18:57:58 2014 -0500 Revert "Drop -std=c89." This reverts commit 0d55a45a6f024919f13cbe70fc861f5eb6d757ee. M cflags.SH ----------------------------------------------------------------------- Summary of changes: cflags.SH | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/cflags.SH b/cflags.SH index 6c3e812..f3e44ad 100755 --- a/cflags.SH +++ b/cflags.SH @@ -167,19 +167,13 @@ case "$gccversion" in [12]*) ;; # gcc versions 1 (gasp!) and 2 are not good for this. Intel*) ;; # # Is that you, Intel C++? # -# NOTE 1: the -std=c89 without -pedantic is a bit pointless, -# so we will not add it here. You will have to use e.g. -# Configure -Accflags=-std=c89 -# +# NOTE 1: the -std=c89 without -pedantic is a bit pointless. # Just -std=c89 means "if there is room for interpretation, # interpret the C89 way." It does NOT mean "strict C89" on its own. # You need to add the -pedantic for that. To do this with Configure, # do -Dgccansipedantic (note that the -ansi is included in any case, # the option is a bit oddly named, for historical reasons.) # -# Furthermore, -std=c89 disables/hides/makes harder to use certain -# non-C89 features like long long. -# # NOTE 2: -pedantic necessitates adding a couple of flags: # * -PERL_GCC_PEDANTIC so that the perl code can adapt: there's nothing # added by gcc itself to indicate pedanticness. @@ -188,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 $pedantic \ +*) for opt in -std=c89 -ansi $pedantic \ -Werror=declaration-after-statement \ -Wextra -W \ -Wc++-compat -Wwrite-strings @@ -219,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 -- Perl5 Master Repository
