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
This commit is contained in:
parent
29978df61f
commit
baa9c647d3
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user