mirror of
https://github.com/curl/curl.git
synced 2026-06-16 20:15:39 +03:00
build: enable -Wlogical-op picky warning for GCC 4.4+
This commit is contained in:
parent
879a1514c3
commit
72f2ab5f1e
2 changed files with 6 additions and 0 deletions
|
|
@ -300,6 +300,7 @@ if(PICKY_COMPILER)
|
|||
list(APPEND _picky_enable
|
||||
-Wdouble-promotion # clang 3.6 gcc 4.6 appleclang 6.1
|
||||
-Wformat=2 # clang 2.7 gcc 4.8
|
||||
-Wlogical-op # gcc 4.4
|
||||
-Wtrampolines # gcc 4.6
|
||||
)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -1115,6 +1115,11 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
|
|||
tmp_CFLAGS="$tmp_CFLAGS -ftree-vrp"
|
||||
fi
|
||||
|
||||
dnl Only gcc 4.4 or later
|
||||
if test "$compiler_num" -ge "404"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [logical-op])
|
||||
fi
|
||||
|
||||
dnl Only gcc 4.5 or later
|
||||
if test "$compiler_num" -ge "405"; then
|
||||
CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [jump-misses-init])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue