curl-compilers.m4: enable vla warning for clang

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
This commit is contained in:
Marcel Raad 2017-06-14 18:18:41 +02:00
parent 01811b6740
commit 783ce023a5
No known key found for this signature in database
GPG Key ID: B4668817AE6D6CD4
1 changed files with 5 additions and 0 deletions

View 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"