From 154a9ab32bace1b31337109d92288a8db9fede87 Mon Sep 17 00:00:00 2001 From: espie Date: Fri, 20 Jul 2018 10:02:03 +0000 Subject: [PATCH] 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@ --- gnu/gcc/gcc/c-pragma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.20.1