]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: sync cutoff version with autotools for picky option `-ftree-vrp`
authorViktor Szakats <commit@vsz.me>
Tue, 25 Feb 2025 13:54:08 +0000 (14:54 +0100)
committerViktor Szakats <commit@vsz.me>
Tue, 25 Feb 2025 15:57:45 +0000 (16:57 +0100)
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

CMake/PickyWarnings.cmake

index b0ec49ac9fff782ae2e123f8af5bce7585f9c9a1..eba3210c526504a5fbc5a6fc368606785cc8522a 100644 (file)
@@ -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)