← Commit list

c951368579

Viktor Szakats
Viktor Szakats
2026-06-12
SUCCESS Duration: 387s

Subject

build: enable `-Wlogical-op` picky warning for GCC 4.4+

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

CMake/PickyWarnings.cmake+1 -0
@@ -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()
m4/curl-compilers.m4+5 -0
@@ -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])