This should have caught https://github.com/curl/curl/issues/16246.
Closes https://github.com/curl/curl/pull/16252
-Wstrict-aliasing=3 # gcc 4.0
)
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
- -Wno-pedantic-ms-format # gcc 4.5 (MinGW-only)
+ -Wjump-misses-init # gcc 4.5
)
+
+ if(MINGW)
+ list(APPEND _picky_enable
+ -Wno-pedantic-ms-format # gcc 4.5 (MinGW-only)
+ )
+ endif()
endif()
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.8)
list(APPEND _picky_enable
#
dnl Only gcc 4.5 or later
if test "$compiler_num" -ge "405"; then
+ CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [jump-misses-init])
dnl Only Windows targets
if test "$curl_cv_native_windows" = "yes"; then
tmp_CFLAGS="$tmp_CFLAGS -Wno-pedantic-ms-format"