Commit 44284983 by Jakub Jelinek Committed by Jakub Jelinek

re PR bootstrap/85921 (/gcc/c-family/c-warn.c fails to build)

	PR bootstrap/85921
	* c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
	noinline variable to workaround broken kernel headers.

From-SVN: r260790
parent 95795b3a
2018-05-26 Jakub Jelinek <jakub@redhat.com>
PR bootstrap/85921
* c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
noinline variable to workaround broken kernel headers.
2018-05-18 Jason Merrill <jason@redhat.com>
* c.opt (Wdeprecated-copy): New flag.
......
......@@ -2246,18 +2246,16 @@ diagnose_mismatched_attributes (tree olddecl, tree newdecl)
newdecl);
/* Diagnose inline __attribute__ ((noinline)) which is silly. */
const char *noinline = "noinline";
if (DECL_DECLARED_INLINE_P (newdecl)
&& DECL_UNINLINABLE (olddecl)
&& lookup_attribute (noinline, DECL_ATTRIBUTES (olddecl)))
&& lookup_attribute ("noinline", DECL_ATTRIBUTES (olddecl)))
warned |= warning (OPT_Wattributes, "inline declaration of %qD follows "
"declaration with attribute %qs", newdecl, noinline);
"declaration with attribute %<noinline%>", newdecl);
else if (DECL_DECLARED_INLINE_P (olddecl)
&& DECL_UNINLINABLE (newdecl)
&& lookup_attribute ("noinline", DECL_ATTRIBUTES (newdecl)))
warned |= warning (OPT_Wattributes, "declaration of %q+D with attribute "
"%qs follows inline declaration", newdecl, noinline);
"%<noinline%> follows inline declaration", newdecl);
return warned;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment