summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcflags.SH14
-rw-r--r--pod/perlhacktips.pod8
2 files changed, 17 insertions, 5 deletions
diff --git a/cflags.SH b/cflags.SH
index 3af1e97a38..c2a529b147 100755
--- a/cflags.SH
+++ b/cflags.SH
@@ -188,6 +188,7 @@ Intel*) ;; # # Is that you, Intel C++?
#
*) for opt in -std=c89 -ansi $pedantic \
-Werror=declaration-after-statement \
+ -Werror=pointer-arith \
-Wextra -W \
-Wc++-compat -Wwrite-strings
do
@@ -247,6 +248,16 @@ Intel*) ;; # # Is that you, Intel C++?
;;
esac
;;
+ -Werror=pointer-arith)
+ # -pedantic* covers -Werror=p-a
+ case "$warn" in
+ *-pedantic*) ;;
+ *)
+ echo "cflags.SH: Adding $opt."
+ warn="$warn $opt"
+ ;;
+ esac
+ ;;
*)
echo "cflags.SH: Adding $opt."
warn="$warn $opt"
@@ -367,7 +378,8 @@ case "$cc" in
;;
esac
-for f in -Wdeclaration-after-statement -Werror=declaration-after-statement
+for f in -Wdeclaration-after-statement -Werror=declaration-after-statement \
+ -Wpointer-arith -Werror=pointer-arith
do
case "$cppflags" in
*"$f"*)
diff --git a/pod/perlhacktips.pod b/pod/perlhacktips.pod
index eef21cad45..773b4dfdc9 100644
--- a/pod/perlhacktips.pod
+++ b/pod/perlhacktips.pod
@@ -1130,6 +1130,10 @@ C<-Wwrite-strings>
C<-Werror=declaration-after-statement>
+=item *
+
+C<-Werror=pointer-arith>
+
=back
The following flags would be nice to have but they would first need
@@ -1139,10 +1143,6 @@ their own Augean stablemaster:
=item *
-C<-Wpointer-arith>
-
-=item *
-
C<-Wshadow>
=item *