]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
configure: inhibit the implicit-fallthrough warning on gcc-12
authorDaniel Stenberg <daniel@haxx.se>
Mon, 28 Jun 2021 15:01:29 +0000 (17:01 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 29 Jun 2021 09:58:25 +0000 (11:58 +0200)
... since it no longer acknowledges the comment markup we use for that
purpose.

Reported-by: Younes El-karama
Fixes #7295
Closes #7307

m4/curl-compilers.m4

index 485e6017eed3f1b0ff02475f41b4b37b031cbc65..6d17a9fbd7d3f6efe61c534c80aa722570ad8352 100644 (file)
@@ -1033,7 +1033,10 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
             CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [alloc-zero])
             tmp_CFLAGS="$tmp_CFLAGS -Wformat-overflow=2"
             tmp_CFLAGS="$tmp_CFLAGS -Wformat-truncation=2"
-            tmp_CFLAGS="$tmp_CFLAGS -Wimplicit-fallthrough=4"
+            if test "$compiler_num" -lt "1200"; then
+              dnl gcc 12 doesn't acknowledge our comment markups
+              tmp_CFLAGS="$tmp_CFLAGS -Wimplicit-fallthrough=4"
+            fi
           fi
           #
         fi