[PATCH] Remove useless noinline variable (PR bootstrap/85921)
Richard Biener
rguenther@suse.de
Sat May 26 06:13:00 GMT 2018
On May 25, 2018 11:03:50 PM GMT+02:00, Jakub Jelinek <jakub@redhat.com> wrote:
>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?
OK.
Richard.
>2018-05-25 Jakub Jelinek <jakub@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
More information about the Gcc-patches
mailing list