aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2018-05-26 08:40:50 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2018-05-26 08:40:50 +0200
commit442849834153349b690041dfdfa81cadae20faa6 (patch)
tree95db4cc053fd597c0e0d5b85626d8f6678000cc8
parent95795b3a57a49688f7e3e4f36ce764ac5317d0e8 (diff)
downloadgcc-442849834153349b690041dfdfa81cadae20faa6.zip
gcc-442849834153349b690041dfdfa81cadae20faa6.tar.gz
gcc-442849834153349b690041dfdfa81cadae20faa6.tar.bz2
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
-rw-r--r--gcc/c-family/ChangeLog6
-rw-r--r--gcc/c-family/c-warn.c8
2 files changed, 9 insertions, 5 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index 22c9547..4fc2f1b 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,9 @@
+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.
diff --git a/gcc/c-family/c-warn.c b/gcc/c-family/c-warn.c
index 2614eb5..e7bcbb1 100644
--- a/gcc/c-family/c-warn.c
+++ b/gcc/c-family/c-warn.c
@@ -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;
}