Unverified Commit 314a7fa3 authored by Marcel Raad's avatar Marcel Raad
Browse files

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
parent a6ad28a7
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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
        ;;
        #