mirror of
https://github.com/curl/curl.git
synced 2026-06-14 20:55:39 +03:00
or higher -> or greater 2
This commit is contained in:
parent
2843e66bd7
commit
b92d14018c
1 changed files with 51 additions and 51 deletions
|
|
@ -174,7 +174,7 @@ dnl -------------------------------------------------
|
|||
dnl Verify if compiler being used is GNU C
|
||||
dnl
|
||||
dnl $compiler_num is set to MAJOR * 100 + MINOR for gcc less than version
|
||||
dnl 7 and $MAJOR * 100 for gcc version 7 or higher.
|
||||
dnl 7 and $MAJOR * 100 for gcc version 7 or greater.
|
||||
dnl
|
||||
dnl Examples:
|
||||
dnl Version 1.2.3 => 102
|
||||
|
|
@ -548,7 +548,7 @@ AC_DEFUN([CURL_SET_COMPILER_BASIC_OPTS], [
|
|||
GNU_C)
|
||||
|
||||
dnl turn implicit-function-declaration warning into error,
|
||||
dnl at least gcc 2.95 or higher support this
|
||||
dnl at least gcc 2.95 or greater support this
|
||||
if test "$compiler_num" -ge "295"; then
|
||||
tmp_CFLAGS="$tmp_CFLAGS -Werror-implicit-function-declaration"
|
||||
fi
|
||||
|
|
@ -816,12 +816,12 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
|
|||
tmp_CFLAGS="$tmp_CFLAGS -Wno-system-headers"
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [shorten-64-to-32])
|
||||
|
||||
dnl Only clang 1.1 or higher
|
||||
dnl Only clang 1.1 or greater
|
||||
if test "$compiler_num" -ge "101"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unused])
|
||||
fi
|
||||
|
||||
dnl Only clang 2.7 or higher
|
||||
dnl Only clang 2.7 or greater
|
||||
if test "$compiler_num" -ge "207"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [address])
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [attributes])
|
||||
|
|
@ -843,13 +843,13 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
|
|||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unreachable-code unused-parameter])
|
||||
fi
|
||||
|
||||
dnl Only clang 2.8 or higher
|
||||
dnl Only clang 2.8 or greater
|
||||
if test "$compiler_num" -ge "208"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [ignored-qualifiers])
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [vla])
|
||||
fi
|
||||
|
||||
dnl Only clang 2.9 or higher
|
||||
dnl Only clang 2.9 or greater
|
||||
if test "$compiler_num" -ge "209"; then
|
||||
tmp_CFLAGS="$tmp_CFLAGS -Wno-sign-conversion"
|
||||
tmp_CFLAGS="$tmp_CFLAGS -Wno-padded" # Not used because we cannot change public structs
|
||||
|
|
@ -857,20 +857,20 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
|
|||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [shift-sign-overflow])
|
||||
fi
|
||||
|
||||
dnl Only clang 3.0 or higher
|
||||
dnl Only clang 3.0 or greater
|
||||
if test "$compiler_num" -ge "300"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [conditional-uninitialized])
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [language-extension-token])
|
||||
fi
|
||||
|
||||
dnl Only clang 3.1 or higher
|
||||
dnl Only clang 3.1 or greater
|
||||
if test "$compiler_num" -ge "301"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [format-non-iso])
|
||||
tmp_CFLAGS="$tmp_CFLAGS -Wno-covered-switch-default" # Annoying to fix or silence
|
||||
tmp_CFLAGS="$tmp_CFLAGS -Wno-disabled-macro-expansion" # for std headers, and curl/curl.h (rare combos)
|
||||
fi
|
||||
|
||||
dnl Only clang 3.2 or higher
|
||||
dnl Only clang 3.2 or greater
|
||||
if test "$compiler_num" -ge "302"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [enum-conversion])
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [sometimes-uninitialized])
|
||||
|
|
@ -885,29 +885,29 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
|
|||
esac
|
||||
fi
|
||||
|
||||
dnl Only clang 3.3 or higher
|
||||
dnl Only clang 3.3 or greater
|
||||
if test "$compiler_num" -ge "303"; then
|
||||
tmp_CFLAGS="$tmp_CFLAGS -Wno-documentation-unknown-command"
|
||||
fi
|
||||
|
||||
dnl Only clang 3.4 or higher
|
||||
dnl Only clang 3.4 or greater
|
||||
if test "$compiler_num" -ge "304"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [header-guard])
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unused-const-variable])
|
||||
fi
|
||||
|
||||
dnl Only clang 3.5 or higher
|
||||
dnl Only clang 3.5 or greater
|
||||
if test "$compiler_num" -ge "305"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [pragmas])
|
||||
# CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unreachable-code-break]) # Not used: Silent in "unity" builds
|
||||
fi
|
||||
|
||||
dnl Only clang 3.6 or higher
|
||||
dnl Only clang 3.6 or greater
|
||||
if test "$compiler_num" -ge "306"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [double-promotion])
|
||||
fi
|
||||
|
||||
dnl Only clang 3.9 or higher
|
||||
dnl Only clang 3.9 or greater
|
||||
if test "$compiler_num" -ge "309"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [comma])
|
||||
dnl avoid the varargs warning, fixed in 4.0
|
||||
|
|
@ -917,46 +917,46 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
|
|||
fi
|
||||
fi
|
||||
|
||||
dnl clang 7 or higher
|
||||
dnl clang 7 or greater
|
||||
if test "$compiler_num" -ge "700"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [assign-enum])
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [extra-semi-stmt])
|
||||
fi
|
||||
|
||||
dnl clang 10 or higher
|
||||
dnl clang 10 or greater
|
||||
if test "$compiler_num" -ge "1000"; then
|
||||
tmp_CFLAGS="$tmp_CFLAGS -Wimplicit-fallthrough" # we have silencing markup for clang 10.0 or higher only
|
||||
tmp_CFLAGS="$tmp_CFLAGS -Wimplicit-fallthrough" # we have silencing markup for clang 10.0 or greater only
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [xor-used-as-pow])
|
||||
fi
|
||||
|
||||
dnl clang 13 or higher
|
||||
dnl clang 13 or greater
|
||||
if test "$compiler_num" -ge "1300"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [cast-function-type])
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [reserved-identifier]) # Keep it before -Wno-reserved-macro-identifier
|
||||
tmp_CFLAGS="$tmp_CFLAGS -Wno-reserved-macro-identifier" # Sometimes such external macros need to be set
|
||||
fi
|
||||
|
||||
dnl clang 16 or higher
|
||||
dnl clang 16 or greater
|
||||
if test "$compiler_num" -ge "1600"; then
|
||||
tmp_CFLAGS="$tmp_CFLAGS -Wno-unsafe-buffer-usage"
|
||||
fi
|
||||
|
||||
dnl clang 17 or higher
|
||||
dnl clang 17 or greater
|
||||
if test "$compiler_num" -ge "1700"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [cast-function-type-strict]) # with Apple clang it requires 16.0 or higher
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [cast-function-type-strict]) # with Apple clang it requires 16.0 or greater
|
||||
fi
|
||||
|
||||
dnl clang 19 or higher
|
||||
dnl clang 19 or greater
|
||||
if test "$compiler_num" -ge "1901"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [format-signedness])
|
||||
fi
|
||||
|
||||
dnl clang 20 or higher
|
||||
dnl clang 20 or greater
|
||||
if test "$compiler_num" -ge "2001"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [array-compare])
|
||||
fi
|
||||
|
||||
dnl clang 21 or higher
|
||||
dnl clang 21 or greater
|
||||
if test "$compiler_num" -ge "2101"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [c++-hidden-decl])
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [implicit-int-enum-cast])
|
||||
|
|
@ -1011,7 +1011,7 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
|
|||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [all])
|
||||
tmp_CFLAGS="$tmp_CFLAGS -W"
|
||||
|
||||
dnl Only gcc 1.4 or higher
|
||||
dnl Only gcc 1.4 or greater
|
||||
if test "$compiler_num" -ge "104"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [pointer-arith write-strings])
|
||||
dnl If not cross-compiling with a gcc older than 3.0
|
||||
|
|
@ -1021,7 +1021,7 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
|
|||
fi
|
||||
fi
|
||||
|
||||
dnl Only gcc 2.7 or higher
|
||||
dnl Only gcc 2.7 or greater
|
||||
if test "$compiler_num" -ge "207"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [nested-externs])
|
||||
dnl If not cross-compiling with a gcc older than 3.0
|
||||
|
|
@ -1032,24 +1032,24 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
|
|||
fi
|
||||
fi
|
||||
|
||||
dnl Only gcc 2.95 or higher
|
||||
dnl Only gcc 2.95 or greater
|
||||
if test "$compiler_num" -ge "295"; then
|
||||
tmp_CFLAGS="$tmp_CFLAGS -Wno-long-long"
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [bad-function-cast])
|
||||
fi
|
||||
|
||||
dnl Only gcc 2.96 or higher
|
||||
dnl Only gcc 2.96 or greater
|
||||
if test "$compiler_num" -ge "296"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [float-equal])
|
||||
tmp_CFLAGS="$tmp_CFLAGS -Wno-multichar"
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [sign-compare])
|
||||
dnl -Wundef used only if gcc is 2.96 or higher since we get
|
||||
dnl -Wundef used only if gcc is 2.96 or greater since we get
|
||||
dnl lots of "`_POSIX_C_SOURCE' is not defined" in system
|
||||
dnl headers with gcc 2.95.4 on FreeBSD 4.9
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [undef])
|
||||
fi
|
||||
|
||||
dnl Only gcc 3.0 or higher
|
||||
dnl Only gcc 3.0 or greater
|
||||
if test "$compiler_num" -ge "300"; then
|
||||
dnl -Wunreachable-code seems totally unreliable on my gcc 3.3.2 on
|
||||
dnl on i686-Linux as it gives us heaps with false positives.
|
||||
|
|
@ -1058,24 +1058,24 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
|
|||
tmp_CFLAGS="$tmp_CFLAGS"
|
||||
fi
|
||||
|
||||
dnl Only gcc 3.3 or higher
|
||||
dnl Only gcc 3.3 or greater
|
||||
if test "$compiler_num" -ge "303"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [endif-labels strict-prototypes])
|
||||
fi
|
||||
|
||||
dnl Only gcc 3.4 or higher
|
||||
dnl Only gcc 3.4 or greater
|
||||
if test "$compiler_num" -ge "304"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [declaration-after-statement])
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [old-style-definition])
|
||||
fi
|
||||
|
||||
dnl Only gcc 4.0 or higher
|
||||
dnl Only gcc 4.0 or greater
|
||||
if test "$compiler_num" -ge "400"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [cast-qual])
|
||||
tmp_CFLAGS="$tmp_CFLAGS -Wstrict-aliasing=3"
|
||||
fi
|
||||
|
||||
dnl Only gcc 4.1 or higher
|
||||
dnl Only gcc 4.1 or greater
|
||||
if test "$compiler_num" -ge "401"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [attributes])
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [div-by-zero format-security])
|
||||
|
|
@ -1097,12 +1097,12 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
|
|||
# tmp_CFLAGS="$tmp_CFLAGS -Wno-error=unused-macros"
|
||||
fi
|
||||
|
||||
dnl Only gcc 4.2 or higher
|
||||
dnl Only gcc 4.2 or greater
|
||||
if test "$compiler_num" -ge "402"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [cast-align])
|
||||
fi
|
||||
|
||||
dnl Only gcc 4.3 or higher
|
||||
dnl Only gcc 4.3 or greater
|
||||
if test "$compiler_num" -ge "403"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [address])
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [type-limits old-style-declaration])
|
||||
|
|
@ -1115,12 +1115,12 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
|
|||
tmp_CFLAGS="$tmp_CFLAGS -ftree-vrp"
|
||||
fi
|
||||
|
||||
dnl Only gcc 4.4 or higher
|
||||
dnl Only gcc 4.4 or greater
|
||||
if test "$compiler_num" -ge "404"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [logical-op])
|
||||
fi
|
||||
|
||||
dnl Only gcc 4.5 or higher
|
||||
dnl Only gcc 4.5 or greater
|
||||
if test "$compiler_num" -ge "405"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [jump-misses-init])
|
||||
dnl Only Windows targets
|
||||
|
|
@ -1135,24 +1135,24 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
|
|||
esac
|
||||
fi
|
||||
|
||||
dnl Only gcc 4.6 or higher
|
||||
dnl Only gcc 4.6 or greater
|
||||
if test "$compiler_num" -ge "406"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [double-promotion])
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [trampolines])
|
||||
fi
|
||||
|
||||
dnl only gcc 4.8 or higher
|
||||
dnl only gcc 4.8 or greater
|
||||
if test "$compiler_num" -ge "408"; then
|
||||
tmp_CFLAGS="$tmp_CFLAGS -Wformat=2"
|
||||
fi
|
||||
|
||||
dnl Only gcc 5 or higher
|
||||
dnl Only gcc 5 or greater
|
||||
if test "$compiler_num" -ge "500"; then
|
||||
tmp_CFLAGS="$tmp_CFLAGS -Warray-bounds=2"
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [format-signedness])
|
||||
fi
|
||||
|
||||
dnl Only gcc 6 or higher
|
||||
dnl Only gcc 6 or greater
|
||||
if test "$compiler_num" -ge "600"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [shift-negative-value])
|
||||
tmp_CFLAGS="$tmp_CFLAGS -Wshift-overflow=2"
|
||||
|
|
@ -1162,7 +1162,7 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
|
|||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unused-const-variable])
|
||||
fi
|
||||
|
||||
dnl Only gcc 7 or higher
|
||||
dnl Only gcc 7 or greater
|
||||
if test "$compiler_num" -ge "700"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [duplicated-branches])
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [restrict])
|
||||
|
|
@ -1171,24 +1171,24 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
|
|||
tmp_CFLAGS="$tmp_CFLAGS -Wimplicit-fallthrough"
|
||||
fi
|
||||
|
||||
dnl Only gcc 10 or higher
|
||||
dnl Only gcc 10 or greater
|
||||
if test "$compiler_num" -ge "1000"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [arith-conversion])
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [enum-conversion])
|
||||
fi
|
||||
|
||||
dnl Only gcc 12 or higher
|
||||
dnl Only gcc 12 or greater
|
||||
if test "$compiler_num" -ge "1200"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [array-compare])
|
||||
fi
|
||||
|
||||
dnl Only gcc 13 or higher
|
||||
dnl Only gcc 13 or greater
|
||||
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
|
||||
|
||||
dnl Only gcc 15 or higher
|
||||
dnl Only gcc 15 or greater
|
||||
if test "$compiler_num" -ge "1500"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [leading-whitespace=spaces])
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [trailing-whitespace=any])
|
||||
|
|
@ -1204,11 +1204,11 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
|
|||
dnl some warnings triggered on third party system headers.
|
||||
if test "$cross_compiling" = "yes"; then
|
||||
if test "$compiler_num" -ge "104"; then
|
||||
dnl gcc 1.4 or higher
|
||||
dnl gcc 1.4 or greater
|
||||
tmp_CFLAGS="$tmp_CFLAGS -Wno-unused -Wno-shadow"
|
||||
fi
|
||||
if test "$compiler_num" -ge "207"; then
|
||||
dnl gcc 2.7 or higher
|
||||
dnl gcc 2.7 or greater
|
||||
tmp_CFLAGS="$tmp_CFLAGS -Wno-missing-declarations"
|
||||
tmp_CFLAGS="$tmp_CFLAGS -Wno-missing-prototypes"
|
||||
fi
|
||||
|
|
@ -1508,7 +1508,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_SYMBOL_HIDING], [
|
|||
supports_symbol_hiding="yes"
|
||||
;;
|
||||
GNU_C)
|
||||
dnl Only gcc 3.4 or higher
|
||||
dnl Only gcc 3.4 or greater
|
||||
if test "$compiler_num" -ge "304"; then
|
||||
if $CC --help --verbose 2>/dev/null | grep fvisibility= >/dev/null; then
|
||||
tmp_EXTERN="__attribute__((__visibility__(\"default\")))"
|
||||
|
|
@ -1518,7 +1518,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_SYMBOL_HIDING], [
|
|||
fi
|
||||
;;
|
||||
INTEL_UNIX_C)
|
||||
dnl Only icc 9.0 or higher
|
||||
dnl Only icc 9.0 or greater
|
||||
if test "$compiler_num" -ge "900"; then
|
||||
if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null; then
|
||||
tmp_save_CFLAGS="$CFLAGS"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue