]> granicus.if.org Git - curl/commitdiff
curl-compilers.m4: enable vla warning for clang
authorMarcel Raad <raad@teamviewer.com>
Wed, 14 Jun 2017 16:18:41 +0000 (18:18 +0200)
committerMarcel Raad <raad@teamviewer.com>
Fri, 16 Jun 2017 20:31:48 +0000 (22:31 +0200)
Previously, that warning was only implicitly active in C90 mode.
Enable it unconditionally as already done for GCC.

Closes https://github.com/curl/curl/pull/1578

m4/curl-compilers.m4

index 88e9d67ba2b5da05745174af26e3abc7267e7b72..5860f946efc7b90c34a244ac66996afcc6b0d65f 100644 (file)
@@ -882,6 +882,11 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
             tmp_CFLAGS="$tmp_CFLAGS -Wunused"
           fi
           #
+          dnl Only clang 2.8 or later
+          if test "$compiler_num" -ge "208"; then
+            tmp_CFLAGS="$tmp_CFLAGS -Wvla"
+          fi
+          #
           dnl Only clang 2.9 or later
           if test "$compiler_num" -ge "209"; then
             tmp_CFLAGS="$tmp_CFLAGS -Wshift-sign-overflow"