From 7886147fdc48d029686af31c71c808adad1a5737 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Fri, 11 Jun 2021 12:17:44 +0000 Subject: 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). --- cflags.SH | 1 + 1 file changed, 1 insertion(+) (limited to 'cflags.SH') 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 -- cgit v1.2.1