projects
/
curl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a6ad28a
)
curl-compilers.m4: enable -Wshift-sign-overflow for clang
author
Marcel Raad
<Marcel.Raad@teamviewer.com>
Tue, 30 May 2017 08:07:47 +0000
(10:07 +0200)
committer
Marcel Raad
<Marcel.Raad@teamviewer.com>
Wed, 31 May 2017 08:06:53 +0000
(10:06 +0200)
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
m4/curl-compilers.m4
patch
|
blob
|
history
diff --git
a/m4/curl-compilers.m4
b/m4/curl-compilers.m4
index 5890324468a0055411dde5b77288b73f86a6863a..673f640979a345332c84876331c0c0c4e5d9fe4b 100644
(file)
--- 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
;;
#