configure: silence useless clang warnings in C89 builds

Syncing with CMake.

Follow-up to 43397b0283 #21015
Follow-up to 09c9afdd71 #20363

Closes #21263
This commit is contained in:
Viktor Szakats 2026-04-08 03:18:11 +02:00
parent f82ed74ed6
commit 4c9af8b6d1
No known key found for this signature in database

View File

@ -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
;;
#