From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 108898 invoked by alias); 26 Jun 2015 08:00:04 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 108874 invoked by uid 89); 26 Jun 2015 08:00:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 26 Jun 2015 08:00:02 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 4E435BC939 for ; Fri, 26 Jun 2015 08:00:01 +0000 (UTC) Received: from redhat.com (ovpn-204-67.brq.redhat.com [10.40.204.67]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t5Q7xvRL005477 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Fri, 26 Jun 2015 04:00:00 -0400 Date: Fri, 26 Jun 2015 08:08:00 -0000 From: Marek Polacek To: GCC Patches Subject: [committed] Use VAR_OR_FUNCTION_DECL_P Message-ID: <20150626075957.GD10139@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2015-06/txt/msg01899.txt.bz2 As Uros pointed out. Bootstrapped/regtested on x86_64-linux, applying to trunk. 2015-06-26 Marek Polacek * 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