mirror of
https://github.com/curl/curl.git
synced 2025-02-23 15:10:03 +08:00
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
This commit is contained in:
parent
a6ad28a75e
commit
314a7fa3ce
@ -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
|
||||
;;
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user