Hi! The following variable only makes the code larger and less readable. In addition, with some broken kernel headers that redefine noinline it breaks bootstrap.
Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2018-05-25 Jakub Jelinek <ja...@redhat.com> PR bootstrap/85921 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary noinline variable to workaround broken kernel headers. --- gcc/c-family/c-warn.c.jj 2018-05-21 13:15:33.878575581 +0200 +++ gcc/c-family/c-warn.c 2018-05-25 14:28:12.151050892 +0200 @@ -2246,18 +2246,16 @@ diagnose_mismatched_attributes (tree old 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; } Jakub