mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:31:41 +03:00
build: enable gcc-12/13+, clang-10+ picky warnings
Cherry-picked from #17190 Closes #17196
This commit is contained in:
parent
f9eb9e5e23
commit
4b7accda5a
2 changed files with 20 additions and 0 deletions
|
|
@ -905,6 +905,7 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
|
|||
dnl clang 10 or later
|
||||
if test "$compiler_num" -ge "1000"; then
|
||||
tmp_CFLAGS="$tmp_CFLAGS -Wimplicit-fallthrough" # we have silencing markup for clang 10.0 and above only
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [xor-used-as-pow])
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
|
@ -1096,6 +1097,17 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
|
|||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [enum-conversion])
|
||||
fi
|
||||
#
|
||||
dnl Only gcc 12 or later
|
||||
if test "$compiler_num" -ge "1200"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [array-compare])
|
||||
fi
|
||||
#
|
||||
dnl Only gcc 13 or later
|
||||
if test "$compiler_num" -ge "1300"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [enum-int-mismatch])
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [xor-used-as-pow])
|
||||
fi
|
||||
#
|
||||
fi
|
||||
#
|
||||
dnl Do not issue warnings for code in system include paths.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue