diff options
author | Marcel Raad <Marcel.Raad@teamviewer.com> | 2017-05-30 10:07:47 +0200 |
---|---|---|
committer | Marcel Raad <Marcel.Raad@teamviewer.com> | 2017-05-31 10:06:53 +0200 |
commit | 314a7fa3ceb74f90cc7cce28bef7517ef874f64c (patch) | |
tree | 9a3137d68f9d2190a8093360b1f7fae9136dee56 /m4 | |
parent | a6ad28a75e55859f6bb66a1eaf339154f59691a8 (diff) |
curl-compilers.m4: enable -Wshift-sign-overflow for clang
clang 2.9+ supports -Wshift-sign-overflow, which warns about undefined
behavior on signed left shifts when shifting by too many places.
Ref: https://github.com/curl/curl/issues/1516
Closes https://github.com/curl/curl/pull/1517
Diffstat (limited to 'm4')
-rw-r--r-- | m4/curl-compilers.m4 | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4 index 589032446..673f64097 100644 --- a/m4/curl-compilers.m4 +++ b/m4/curl-compilers.m4 @@ -881,6 +881,11 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [ if test "$compiler_num" -ge "101"; then tmp_CFLAGS="$tmp_CFLAGS -Wunused" fi + # + dnl Only clang 2.9 or later + if test "$compiler_num" -ge "209"; then + tmp_CFLAGS="$tmp_CFLAGS -Wshift-sign-overflow" + fi fi ;; # |