From: Viktor Szakats Date: Tue, 25 Feb 2025 13:54:08 +0000 (+0100) Subject: cmake: sync cutoff version with autotools for picky option `-ftree-vrp` X-Git-Tag: curl-8_13_0~351 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=baa9c647d37392c00ee7f3b947db5f77b93b4731;p=thirdparty%2Fcurl.git cmake: sync cutoff version with autotools for picky option `-ftree-vrp` Sync cutoff version for `-ftree-vrp` with autotools, which enables it for gcc 4.3+ (cmake builds enabled it for 5.0+, before this patch). Cherry-picked from #16476 Closes #16478 --- diff --git a/CMake/PickyWarnings.cmake b/CMake/PickyWarnings.cmake index b0ec49ac9f..eba3210c52 100644 --- a/CMake/PickyWarnings.cmake +++ b/CMake/PickyWarnings.cmake @@ -182,6 +182,7 @@ if(PICKY_COMPILER) -Wold-style-declaration # gcc 4.3 -Wpragmas # clang 3.5 gcc 4.1 appleclang 6.0 -Wstrict-aliasing=3 # gcc 4.0 + -ftree-vrp # gcc 4.3 (required for -Warray-bounds, included in -Wall) ) endif() if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.5) @@ -204,7 +205,7 @@ if(PICKY_COMPILER) endif() if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 5.0) list(APPEND _picky_enable - -Warray-bounds=2 -ftree-vrp # clang 3.0 gcc 5.0 (clang default: -Warray-bounds) + -Warray-bounds=2 # clang 3.0 gcc 5.0 (clang default: -Warray-bounds) ) endif() if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 6.0)