From: espie Date: Fri, 20 Jul 2018 10:02:03 +0000 (+0000) Subject: inform that diagnostics in functions won't work, but don't error out X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=154a9ab32bace1b31337109d92288a8db9fede87;p=openbsd inform that diagnostics in functions won't work, but don't error out flatly. this will help sparc64 compile code without needing to patch away recent pragma diagnostic use. problem found by landry@ okay kettenis@, guenther@ --- diff --git a/gnu/gcc/gcc/c-pragma.c b/gnu/gcc/gcc/c-pragma.c index b2712acc937..3f9c7ea43cf 100644 --- a/gnu/gcc/gcc/c-pragma.c +++ b/gnu/gcc/gcc/c-pragma.c @@ -691,7 +691,7 @@ handle_pragma_diagnostic(cpp_reader *ARG_UNUSED(dummy)) if (cfun) { - error ("#pragma GCC diagnostic not allowed inside functions"); + warning (OPT_Wpragmas, "#pragma GCC diagnostic ignored inside functions"); return; }