diff options
author | Marcel Raad <raad@teamviewer.com> | 2017-06-16 14:06:23 +0200 |
---|---|---|
committer | Marcel Raad <raad@teamviewer.com> | 2017-06-16 22:31:57 +0200 |
commit | b5c5909f30ea68a1528b1fe24871b2e49a01f119 (patch) | |
tree | a7cd006c238cb4375e23a391d4a88183dcd0198c /m4 | |
parent | 783ce023a54cde30f9b3597554d65e0d24aa2655 (diff) |
curl-compilers.m4: enable double-promotion warning
Enable -Wdouble-promotion for both GCC and clang. It warns on implicit
promotion from float to double.
Closes https://github.com/curl/curl/pull/1578
Diffstat (limited to 'm4')
-rw-r--r-- | m4/curl-compilers.m4 | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4 index 5860f946e..7d53953c9 100644 --- a/m4/curl-compilers.m4 +++ b/m4/curl-compilers.m4 @@ -891,6 +891,11 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [ if test "$compiler_num" -ge "209"; then tmp_CFLAGS="$tmp_CFLAGS -Wshift-sign-overflow" fi + # + dnl Only clang 3.6 or later + if test "$compiler_num" -ge "306"; then + tmp_CFLAGS="$tmp_CFLAGS -Wdouble-promotion" + fi fi ;; # @@ -1002,6 +1007,11 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [ fi fi # + dnl Only gcc 4.6 or later + if test "$compiler_num" -ge "406"; then + tmp_CFLAGS="$tmp_CFLAGS -Wdouble-promotion" + fi + # fi # dnl Do not issue warnings for code in system include paths. |