mirror of
https://github.com/curl/curl.git
synced 2025-09-10 22:22:43 +03:00
build: enable -Wjump-misses-init for GCC 4.5+
This should have caught https://github.com/curl/curl/issues/16246. Closes https://github.com/curl/curl/pull/16252
This commit is contained in:
parent
d164f49520
commit
db4d617c1c
|
@ -184,11 +184,17 @@ if(PICKY_COMPILER)
|
||||||
-Wstrict-aliasing=3 # gcc 4.0
|
-Wstrict-aliasing=3 # gcc 4.0
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.5 AND MINGW)
|
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.5)
|
||||||
|
list(APPEND _picky_enable
|
||||||
|
-Wjump-misses-init # gcc 4.5
|
||||||
|
)
|
||||||
|
|
||||||
|
if(MINGW)
|
||||||
list(APPEND _picky_enable
|
list(APPEND _picky_enable
|
||||||
-Wno-pedantic-ms-format # gcc 4.5 (MinGW-only)
|
-Wno-pedantic-ms-format # gcc 4.5 (MinGW-only)
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.8)
|
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.8)
|
||||||
list(APPEND _picky_enable
|
list(APPEND _picky_enable
|
||||||
-Wdouble-promotion # clang 3.6 gcc 4.6 appleclang 6.3
|
-Wdouble-promotion # clang 3.6 gcc 4.6 appleclang 6.3
|
||||||
|
|
|
@ -1040,6 +1040,7 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
|
||||||
#
|
#
|
||||||
dnl Only gcc 4.5 or later
|
dnl Only gcc 4.5 or later
|
||||||
if test "$compiler_num" -ge "405"; then
|
if test "$compiler_num" -ge "405"; then
|
||||||
|
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [jump-misses-init])
|
||||||
dnl Only Windows targets
|
dnl Only Windows targets
|
||||||
if test "$curl_cv_native_windows" = "yes"; then
|
if test "$curl_cv_native_windows" = "yes"; then
|
||||||
tmp_CFLAGS="$tmp_CFLAGS -Wno-pedantic-ms-format"
|
tmp_CFLAGS="$tmp_CFLAGS -Wno-pedantic-ms-format"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user