From 4c9af8b6d183ba4f84564dda9c17303b6c10d6f8 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 8 Apr 2026 03:18:11 +0200 Subject: [PATCH] configure: silence useless clang warnings in C89 builds Syncing with CMake. Follow-up to 43397b0283d4cdb10797e7ead6eacbe09f8a3e77 #21015 Follow-up to 09c9afdd711d0b2ee9f524a235803e755e1074b7 #20363 Closes #21263 --- m4/curl-compilers.m4 | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4 index 9fce552515..b37c53ce06 100644 --- a/m4/curl-compilers.m4 +++ b/m4/curl-compilers.m4 @@ -962,6 +962,17 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [ CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [c++-keyword]) fi fi + + case "$CFLAGS" in + *-std=c89*|*-std=c90*|*-std=gnu89*|*-std=gnu90*) + if test "$compiler_num" -ge "300"; then + tmp_CFLAGS="$tmp_CFLAGS -Wno-c99-extensions" # Avoid: warning: '_Bool' is a C99 extension + fi + if test "$compiler_num" -ge "309"; then + tmp_CFLAGS="$tmp_CFLAGS -Wno-comma" # Just silly + fi + ;; + esac fi ;; #