This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make also cflags.SH clean with g++ -Wunused-*
authorJarkko Hietaniemi <jhi@iki.fi>
Wed, 18 Jun 2014 12:43:37 +0000 (08:43 -0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Wed, 18 Jun 2014 18:14:27 +0000 (14:14 -0400)
"clean" as in "not needed anymore".

cflags.SH

index 5538e92..69ad999 100755 (executable)
--- a/cflags.SH
+++ b/cflags.SH
@@ -241,39 +241,6 @@ do
   esac
 done
 
-# -Wall includes -Wunused-value and -Wunused-parameter, which may be too much
-# with some compilers.
-#
-# XXX this is related to the unfortunate fact that bare -Wall (without
-# amending -Wno-unused-...) is too much for XS code because of all the
-# often generated but unused things.
-#
-case "$ccflags$warn" in
-*-Wall*)
-  case "$cc" in
-  *g++*)
-    # Without -Wno-unused-variable g++ 4.x compiles are rather unwatchable
-    # because of all the warnings about Perl___notused, and g++ doesn't do
-    # __attribute__((unused)) (and even if at some stage it may, people do
-    # have older gcc installations), and ((void)x) isn't enough to silence
-    # the noises about XS functions not using their cv parameter, so we need
-    # the -Wno-unused-parameter too.
-    # Yes, we lose some valid warnings, but hopefully other compilers
-    # (like gcc) will still pick up those warnings.
-    for f in -Wno-unused-variable -Wno-unused-parameter
-    do
-      case "$warn" in
-      *"$f"*) ;;
-      *)
-        echo "cflags.SH: Adding $f because of g++."
-        warn="$warn $f" ;;
-      esac
-    done
-    ;;
-  esac
-  ;;
-esac
-
 # Code to set any extra flags here.
 extra=''