]> granicus.if.org Git - curl/commitdiff
curl-compilers.m4: enable comma clang warning
authorMarcel Raad <raad@teamviewer.com>
Fri, 16 Jun 2017 12:13:41 +0000 (14:13 +0200)
committerMarcel Raad <raad@teamviewer.com>
Fri, 16 Jun 2017 20:32:13 +0000 (22:32 +0200)
It usually warns when using commas instead of semicolons or other
operators by accident.

Closes https://github.com/curl/curl/pull/1578

m4/curl-compilers.m4

index 9efe2ae2350202a63ecc76a6b13db299e62903b8..a1801df97d4d958b533d9ca7dd27cf2919e3a323 100644 (file)
@@ -901,6 +901,11 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [
           if test "$compiler_num" -ge "306"; then
             tmp_CFLAGS="$tmp_CFLAGS -Wdouble-promotion"
           fi
+          #
+          dnl Only clang 3.9 or later
+          if test "$compiler_num" -ge "309"; then
+            tmp_CFLAGS="$tmp_CFLAGS -Wcomma"
+          fi
         fi
         ;;
         #