From patchwork Thu May 18 10:57:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Sidwell X-Patchwork-Id: 763915 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wT7Sc4gwMz9ryv for ; Thu, 18 May 2017 20:57:51 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="yPEAJyFd"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=UwwdVHLgImCLTlJfQL5xNstAfXz3k63qV63brnUQAf8E8Pfw7j tCYq7+yJPEjPHWCJopRW/ojPBpVjXDwmCGhIqsw4Lqjkr7ruuQulc77sc2+PNQuW nssmrYyb3WHdlZrR9qfhb4Ih0kgtki4yzxIXsQf+TYiUSr7/YI4SHBAQk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=yb/fH48i5GA3od2yfcA8DkSFJCo=; b=yPEAJyFd7ACu3Uw63ARl 3iWXBpRtpJ3EGgPA9z5QFoa4UjvKs2w5xOWKFJyFePydIaIIWnUetZ5TZP0EBdg7 7kJa7TJ+j/RVC3KTpDwgigRfOq8BLoNWhWT8K2IGiOiGQDe8Dmt1fWnxjpzFgS2s oR19OPaXIvmRnn8deyAS7ME= Received: (qmail 69205 invoked by alias); 18 May 2017 10:57:38 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 69188 invoked by uid 89); 18 May 2017 10:57:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.3 required=5.0 tests=BAYES_00, FREEMAIL_FROM, GIT_PATCH_2, GIT_PATCH_3, KAM_STOCKGEN, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-yw0-f173.google.com Received: from mail-yw0-f173.google.com (HELO mail-yw0-f173.google.com) (209.85.161.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 18 May 2017 10:57:36 +0000 Received: by mail-yw0-f173.google.com with SMTP id l14so18942901ywk.1 for ; Thu, 18 May 2017 03:57:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:to:from:subject:message-id:date :user-agent:mime-version:content-language; bh=7yCi6CLVZwNei0yF2Cm6Qsn4Qamp816S69X8L/tPH2Y=; b=ZrL3Zj4iHOpiGwRc1H/xQfBQowHu2iTQiXlJC+FqYCqD9+4XYFgMgySGbBLZSh/spl IB9J32JvbFWnt9qBnsJ84KLTFaesR1GxMSsSgUnYMYtNpTXzT7cpTXEWKuOo3h+qfVXx k3q06Xi4+VQmv3wmpgw5C6dQkr7yy9shbbmjeI8sK1LSEYyfoAtChESx5HT2oHWCSEUk 7F24Q1YxbiRlQqnY2IEqwASlRxSsCS6nnNB5+9lEtj3iu3HWoPDtuVesMw1coLbk0f18 7AoenUgHM36H55hi2Df0oMs60zcMbKaLbwDbp1oL20SYLGViu7kcjkDvtJ1TUXF4JsrH ioBg== X-Gm-Message-State: AODbwcBdkrH4QWDCxasEKsLRGKWlebzVtLCBKTnir1/Pt36jNAy6gzhH DWAUG5mXLr9YI+JU X-Received: by 10.13.216.209 with SMTP id a200mr3037224ywe.5.1495105058121; Thu, 18 May 2017 03:57:38 -0700 (PDT) Received: from ?IPv6:2620:10d:c0a3:20fb:f6d0:5ac5:64cd:f102? ([2620:10d:c091:200::7:4a1a]) by smtp.googlemail.com with ESMTPSA id b78sm2290611ywh.73.2017.05.18.03.57.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 May 2017 03:57:37 -0700 (PDT) To: GCC Patches , Joseph Myers From: Nathan Sidwell Subject: [C PATCH] delete unused function Message-ID: <131af549-b870-3931-82e1-8d084faa15c5@acm.org> Date: Thu, 18 May 2017 06:57:36 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In searching around for but 80803 I discovered that pushdecl_top_level appears unused in the C FE. grepping under the gcc directory I find definitions and uses in the c++ FE and separate def/use in the fortran FE. In the C FE I only find a definition. AFAICT this is a stale function and comment about objective C, which presumably uses the pushdecl hook these days? bootstrapping shows no regression. (I don't think this explains the 80803 problem) ok? nathan 2017-05-18 Nathan Sidwell * c-decl.c (pushdecl_top_level): Delete unused function. Index: c/c-decl.c =================================================================== --- c/c-decl.c (revision 248144) +++ c/c-decl.c (working copy) @@ -3088,34 +3088,6 @@ pushdecl (tree x) } return x; } - -/* Record X as belonging to file scope. - This is used only internally by the Objective-C front end, - and is limited to its needs. duplicate_decls is not called; - if there is any preexisting decl for this identifier, it is an ICE. */ - -tree -pushdecl_top_level (tree x) -{ - tree name; - bool nested = false; - gcc_assert (VAR_P (x) || TREE_CODE (x) == CONST_DECL); - - name = DECL_NAME (x); - - gcc_assert (TREE_CODE (x) == CONST_DECL || !I_SYMBOL_BINDING (name)); - - if (TREE_PUBLIC (x)) - { - bind (name, x, external_scope, /*invisible=*/true, /*nested=*/false, - UNKNOWN_LOCATION); - nested = true; - } - if (file_scope) - bind (name, x, file_scope, /*invisible=*/false, nested, UNKNOWN_LOCATION); - - return x; -} /* Issue a warning about implicit function declaration. ID is the function