public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Marek Polacek <polacek@redhat.com>
To: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: [committed] Use VAR_OR_FUNCTION_DECL_P
Date: Fri, 26 Jun 2015 08:08:00 -0000	[thread overview]
Message-ID: <20150626075957.GD10139@redhat.com> (raw)

As Uros pointed out.

Bootstrapped/regtested on x86_64-linux, applying to trunk.

2015-06-26  Marek Polacek  <polacek@redhat.com>

	* c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.

diff --git gcc/c-family/c-common.c gcc/c-family/c-common.c
index 73d0c7f..b11a756 100644
--- gcc/c-family/c-common.c
+++ gcc/c-family/c-common.c
@@ -7376,8 +7376,7 @@ handle_unused_attribute (tree *node, tree name, tree ARG_UNUSED (args),
       tree decl = *node;
 
       if (TREE_CODE (decl) == PARM_DECL
-	  || VAR_P (decl)
-	  || TREE_CODE (decl) == FUNCTION_DECL
+	  || VAR_OR_FUNCTION_DECL_P (decl)
 	  || TREE_CODE (decl) == LABEL_DECL
 	  || TREE_CODE (decl) == TYPE_DECL)
 	{

	Marek

                 reply	other threads:[~2015-06-26  8:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150626075957.GD10139@redhat.com \
    --to=polacek@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).