From: Daniel Stenberg Date: Mon, 7 Sep 2020 09:03:30 +0000 (+0200) Subject: configure: let --enable-debug set -Wenum-conversion with gcc >= 10 X-Git-Tag: curl-7_73_0~128 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8684bb70d3676dcd84ba14f0d990a1d8dc451c3b;p=thirdparty%2Fcurl.git configure: let --enable-debug set -Wenum-conversion with gcc >= 10 Unfortunately, this option is not detecting the same issues as clang's -Wassign-enum flag, but should still be useful to detect future mistakes. Closes #5930 --- diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4 index 107dc6ab91..b0d5d42137 100644 --- a/m4/curl-compilers.m4 +++ b/m4/curl-compilers.m4 @@ -1119,6 +1119,10 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [ fi fi fi + dnl Only gcc 10 or later + if test "$compiler_num" -ge "1000"; then + CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [enum-conversion]) + fi ;; # HP_UX_C)