]> granicus.if.org Git - gc/commitdiff
Eliminate '-pedantic is not an option that controls warnings' GCC message
authorIvan Maidanski <ivmai@mail.ru>
Wed, 16 Aug 2017 08:23:49 +0000 (11:23 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 16 Aug 2017 08:27:21 +0000 (11:27 +0300)
(fix commit 84c0313)

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

mark.c

diff --git a/mark.c b/mark.c
index 179cfb579753f4b0e1c9fe6b23acc587d6f4944f..33f2fba5ce71f5e22a09fc2e17480319ae2d622b 100644 (file)
--- a/mark.c
+++ b/mark.c
@@ -544,7 +544,7 @@ static void alloc_mark_stack(size_t);
 #     if GC_GNUC_PREREQ(4, 7) || GC_CLANG_PREREQ(3, 3)
 #       pragma GCC diagnostic push
         /* Suppress "taking the address of label is non-standard" warning. */
-#       if defined(__clang__)
+#       if defined(__clang__) || GC_GNUC_PREREQ(7, 0)
 #         pragma GCC diagnostic ignored "-Wpedantic"
 #       else
           /* GCC before ~4.8 does not accept "-Wpedantic" quietly.  */