From patchwork Fri Mar 7 11:45:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Carlini X-Patchwork-Id: 327924 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 B2A762C00A7 for ; Fri, 7 Mar 2014 22:46:27 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; q=dns; s=default; b=P8Swgnys6jGvxzKaK94BjZ/wIS9ayjwRO9yvmDYr9Oi gjxX3YJG1vqvM5pOp9zqrFz7oRAAv0bMzAI4snqDpvVaJI0kaU6JIQ9SJjIW4m+v bgibx9LWKnYViwn7lh6q2NyNkNYjDTXTwe0xGPcAVIVyfOll9v2VjdeHMeHK1akc = 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 :message-id:date:from:mime-version:to:cc:subject:content-type; s=default; bh=iVmFjkaoUKIl6Jd7JUmQyNwvNrM=; b=i9J5xGPR2jejA16Rs Zi4z/kS2xS3o0W/3fInPp9XL432mnKXgHMm3uejkHyUziTVFxghgXNxtqoMxIgfD Vxvr7Bjky1fFXBFqOoqKdiDUxnzWG49o58YQvMP23jgQ4GAGlu3HZ2k45AvmXzv9 DdSQEpbPwBSIUbU4NlA5vN1lh0= Received: (qmail 8989 invoked by alias); 7 Mar 2014 11:46:20 -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 8974 invoked by uid 89); 7 Mar 2014 11:46:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.4 required=5.0 tests=AWL, BAYES_00, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: aserp1040.oracle.com Received: from aserp1040.oracle.com (HELO aserp1040.oracle.com) (141.146.126.69) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 07 Mar 2014 11:46:19 +0000 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s27BkGX3026642 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 7 Mar 2014 11:46:17 GMT Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s27BkFJ9014054 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Fri, 7 Mar 2014 11:46:16 GMT Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s27BkFPC014036; Fri, 7 Mar 2014 11:46:15 GMT Received: from [192.168.1.4] (/79.43.235.92) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 07 Mar 2014 03:46:15 -0800 Message-ID: <5319B160.9090708@oracle.com> Date: Fri, 07 Mar 2014 12:45:36 +0100 From: Paolo Carlini User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: "gcc-patches@gcc.gnu.org" CC: Jason Merrill Subject: [C++ Patch] Remove dead code X-IsSubscribed: yes Hi, while looking into c++/58609 I noticed this dead code. Can I remove it? Tested x86_64-linux. Thanks, Paolo. ///////////////// 2014-03-07 Paolo Carlini * decl.c (check_initializer): Remove dead code. Index: decl.c =================================================================== --- decl.c (revision 208397) +++ decl.c (working copy) @@ -5603,7 +5603,6 @@ check_initializer (tree decl, tree init, int flags { tree type = TREE_TYPE (decl); tree init_code = NULL; - tree extra_init = NULL_TREE; tree core_type; /* Things that are going to be initialized need to have complete @@ -5799,9 +5798,6 @@ check_initializer (tree decl, tree init, int flags if (init && init != error_mark_node) init_code = build2 (INIT_EXPR, type, decl, init); - if (extra_init) - init_code = add_stmt_to_compound (extra_init, init_code); - if (init_code && DECL_IN_AGGR_P (decl)) { static int explained = 0;