summaryrefslogtreecommitdiff
path: root/cflags.SH
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2021-06-11 12:17:44 +0000
committerNicholas Clark <nick@ccl4.org>2021-06-11 12:17:44 +0000
commit7886147fdc48d029686af31c71c808adad1a5737 (patch)
tree7a2316010bd22fc207ce40452e2e07ab65c9c97b /cflags.SH
parent7d4b8f5eb75f985fe5514ff9436ae487d11c0c2d (diff)
downloadperl-7886147fdc48d029686af31c71c808adad1a5737.tar.gz
Add -Werror=vla by default. C99 variable-length arrays are dangerous.
C11 makes them optional, and MSVC doesn't support them. We can't use them (but even if we could, we should not).
Diffstat (limited to 'cflags.SH')
-rwxr-xr-xcflags.SH1
1 files changed, 1 insertions, 0 deletions
diff --git a/cflags.SH b/cflags.SH
index 96bfcd928b..162538583d 100755
--- a/cflags.SH
+++ b/cflags.SH
@@ -180,6 +180,7 @@ Intel*) ;; # # Is that you, Intel C++?
#
*) warns="-std=c89 -ansi $pedantic \
-Werror=pointer-arith \
+ -Werror=vla \
-Wextra -W \
-Wc++-compat -Wwrite-strings"
# declaration after statement is normal in C++ rather than an