mirror of https://github.com/moparisthebest/curl
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
This commit is contained in:
parent
783ce023a5
commit
b5c5909f30
|
@ -891,6 +891,11 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
|
||||||
if test "$compiler_num" -ge "209"; then
|
if test "$compiler_num" -ge "209"; then
|
||||||
tmp_CFLAGS="$tmp_CFLAGS -Wshift-sign-overflow"
|
tmp_CFLAGS="$tmp_CFLAGS -Wshift-sign-overflow"
|
||||||
fi
|
fi
|
||||||
|
#
|
||||||
|
dnl Only clang 3.6 or later
|
||||||
|
if test "$compiler_num" -ge "306"; then
|
||||||
|
tmp_CFLAGS="$tmp_CFLAGS -Wdouble-promotion"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
#
|
#
|
||||||
|
@ -1002,6 +1007,11 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
|
dnl Only gcc 4.6 or later
|
||||||
|
if test "$compiler_num" -ge "406"; then
|
||||||
|
tmp_CFLAGS="$tmp_CFLAGS -Wdouble-promotion"
|
||||||
|
fi
|
||||||
|
#
|
||||||
fi
|
fi
|
||||||
#
|
#
|
||||||
dnl Do not issue warnings for code in system include paths.
|
dnl Do not issue warnings for code in system include paths.
|
||||||
|
|
Loading…
Reference in New Issue