From: Ivan Maidanski Date: Wed, 27 Sep 2017 08:42:46 +0000 (+0300) Subject: Eliminate '-pedantic is not option that controls warnings' GCC-6.4 message X-Git-Tag: v7.6.2~60 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6abf16fe24c2e57de2acf729fad03a4a6bc6e3a5;p=gc Eliminate '-pedantic is not option that controls warnings' GCC-6.4 message (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+. --- diff --git a/mark.c b/mark.c index 5f46a801..63917c24 100644 --- 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. */