From: Rafael Garcia-Suarez Date: Fri, 26 Jan 2007 16:39:40 +0000 (+0000) Subject: If we have specified -Dgccansipedantic on the Configure command-line, X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3e8416a3d479179c18109951e5260dc3c0ae4158;p=p5sagit%2Fp5-mst-13.2.git If we have specified -Dgccansipedantic on the Configure command-line, assume we really want it p4raw-id: //depot/perl@30016 --- diff --git a/cflags.SH b/cflags.SH index ece6548..a52c850 100755 --- a/cflags.SH +++ b/cflags.SH @@ -142,16 +142,18 @@ rm -f _cflags.c _cflags$_exe case "$gccversion" in '') ;; *) - # If we have -Duse64bitint (or equivalent) in effect and the quadtype - # has become 'long long', gcc -pedantic becomes unbearable (moreso - # when combined with -Wall) because long long and LL and %lld|%Ld - # become warn-worthy. So let's drop the -pedantic in that case. - case "$quadtype:$sPRId64" in - "long long"*|*lld*|*Ld*) - ccflags="`echo $ccflags|sed 's/-pedantic/ /'`" - warn="`echo $warn|sed 's/-pedantic/ /'`" - ;; - esac + if [ "$gccansipedantic" = "" ]; then + # If we have -Duse64bitint (or equivalent) in effect and the quadtype + # has become 'long long', gcc -pedantic becomes unbearable (moreso + # when combined with -Wall) because long long and LL and %lld|%Ld + # become warn-worthy. So let's drop the -pedantic in that case. + case "$quadtype:$sPRId64" in + "long long"*|*lld*|*Ld*) + ccflags="`echo $ccflags|sed 's/-pedantic/ /'`" + warn="`echo $warn|sed 's/-pedantic/ /'`" + ;; + esac + fi # Using certain features (like the gcc statement expressions) # requires knowing whether -pedantic has been specified. case "$warn$ccflags" in