]> granicus.if.org Git - gc/commitdiff
Eliminate '-pedantic is not option that controls warnings' GCC-6.4 message
authorIvan Maidanski <ivmai@mail.ru>
Wed, 27 Sep 2017 08:42:46 +0000 (11:42 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 28 Sep 2017 22:00:20 +0000 (01:00 +0300)
(Cherry-pick commit e0a3739 from 'master' branch.)

* mark.c [WRAP_MARK_SOME && (MSWIN32 || MSWINCE) && __GNUC__]
(GC_mark_some): Use "-Wpedantic" instead of "-pedantic" (in pragma
GCC diagnostic) if GCC v6.4+.

mark.c

diff --git a/mark.c b/mark.c
index 5f46a801ca4f533edc47234725b6dceb246b4bf8..63917c24a536d6402d4176e4441af40f072fbbd6 100644 (file)
--- a/mark.c
+++ b/mark.c
@@ -522,7 +522,8 @@ static void alloc_mark_stack(size_t);
          || (__clang_major__ == 3 && __clang_minor__ >= 3)
 #       pragma GCC diagnostic push
         /* Suppress "taking the address of label is non-standard" warning. */
-#       if defined(__clang__) || __GNUC__ >= 7
+#       if defined(__clang__) || __GNUC__ > 6 \
+           || (__GNUC__ == 6 && __GNUC_MINOR__ >= 4)
 #         pragma GCC diagnostic ignored "-Wpedantic"
 #       else
           /* GCC before ~4.8 does not accept "-Wpedantic" quietly.  */