From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21441 invoked by alias); 29 Jan 2016 10:47:32 -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 21425 invoked by uid 89); 29 Jan 2016 10:47:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:689 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, 29 Jan 2016 10:47:30 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 8C41368E3B; Fri, 29 Jan 2016 10:47:29 +0000 (UTC) Received: from [10.10.116.33] (ovpn-116-33.rdu2.redhat.com [10.10.116.33]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0TAlRmq004859; Fri, 29 Jan 2016 05:47:28 -0500 Subject: Re: [C++ PATCH] Fix -Wunused-function (PR debug/66869) To: Jakub Jelinek References: <20160125203829.GP3017@tucnak.redhat.com> <20160126161813.GB3017@tucnak.redhat.com> <20160127185159.GT3017@tucnak.redhat.com> <56A91A7A.3060700@redhat.com> <20160128201506.GG3017@tucnak.redhat.com> <56AAD3B6.2060804@redhat.com> <20160129103507.GM3017@tucnak.redhat.com> Cc: Richard Biener , "Joseph S. Myers" , Marek Polacek , Jan Hubicka , GCC Patches From: Jason Merrill Message-ID: <56AB433F.2050603@redhat.com> Date: Fri, 29 Jan 2016 10:47:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <20160129103507.GM3017@tucnak.redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2016-01/txt/msg02293.txt.bz2 On 01/29/2016 11:35 AM, Jakub Jelinek wrote: > On Thu, Jan 28, 2016 at 09:51:34PM -0500, Jason Merrill wrote: >> On 01/28/2016 03:15 PM, Jakub Jelinek wrote: >>> + if (TREE_CODE (decl) == FUNCTION_DECL >>> + && DECL_INITIAL (decl) == 0 >>> + && DECL_EXTERNAL (decl) >>> + && !TREE_PUBLIC (decl) >>> + && !DECL_ARTIFICIAL (decl) >>> + && !TREE_NO_WARNING (decl)) >> >> Do we need to check both DECL_INITIAL and DECL_EXTERNAL? > > Dunno, but that is what cgraphunit.c does, c-decl.c too, > what the old toplev.c (check_global_declaration_1) did (back to at least > r26593 from ~ 1999), so I think we want some consistency. OK. Jason