summaryrefslogtreecommitdiff
path: root/cflags.SH
diff options
context:
space:
mode:
authorDagfinn Ilmari Mannsåker <ilmari@ilmari.org>2017-08-08 11:41:08 +0100
committerDagfinn Ilmari Mannsåker <ilmari@ilmari.org>2017-08-17 12:42:17 +0100
commit5997475bc5b04a4e42d825ab4692425aeb332471 (patch)
tree290772fc27600d34233fd23ee62f9a8c1eb43bf5 /cflags.SH
parent2884c977bbe7d4e57be3847ffccf17de935bc6c4 (diff)
downloadperl-5997475bc5b04a4e42d825ab4692425aeb332471.tar.gz
Add -Werror=pointer-arith by default
The core is already clean for this.
Diffstat (limited to 'cflags.SH')
-rwxr-xr-xcflags.SH14
1 files changed, 13 insertions, 1 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"*)