This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
If we have specified -Dgccansipedantic on the Configure command-line,
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Fri, 26 Jan 2007 16:39:40 +0000 (16:39 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Fri, 26 Jan 2007 16:39:40 +0000 (16:39 +0000)
assume we really want it

p4raw-id: //depot/perl@30016

cflags.SH

index ece6548..a52c850 100755 (executable)
--- 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