From patchwork Tue Jan 2 14:50:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Sidwell X-Patchwork-Id: 854571 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-469970-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="FmfuQnZW"; dkim-atps=neutral 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 3z9xnP6Jnwz9sBZ for ; Wed, 3 Jan 2018 01:50:32 +1100 (AEDT) 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=HGRh2jG9S3ognyaGRL/O2iC5Ouk2+h9/OqCbgllUtZN89stfAq /uf3e0RFaiK8o1nIE8qpTVngoTIvBKyHisd9anGo0knJq9q+uSZBPAfA+bbkoCsR T0T3ETDNS3pGnr9xEdSA3uGIfilQb8wAEUylnUV1fcbblBl0P0k+dJa1c= 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=p9EJncTMvMI+kox/cdoFgSDQXT0=; b=FmfuQnZWlF9djDiO4aaK D9vd1Syg8/TKLi5etyb4A1vnKXG552iQ7b+pepEzI2aF18mbqiNNLsrhaKZEOGhf jV8bnn2fRSdHzWhxQrvH2pGSwL2sPMba9vfdB9AChWMB4nZuMiI2X3z9uAGszPFS 79M2yMR1fodrjkpV5BIl0Hc= Received: (qmail 102820 invoked by alias); 2 Jan 2018 14:50:25 -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 102305 invoked by uid 89); 2 Jan 2018 14:50:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00, FREEMAIL_FROM, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=H*RU:200, Hx-spam-relays-external:200, H*r:200, H*F:D*acm.org X-HELO: mail-yw0-f169.google.com Received: from mail-yw0-f169.google.com (HELO mail-yw0-f169.google.com) (209.85.161.169) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 02 Jan 2018 14:50:23 +0000 Received: by mail-yw0-f169.google.com with SMTP id v187so11932108ywc.2 for ; Tue, 02 Jan 2018 06:50:23 -0800 (PST) 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=G6mAvzPrnEiQXEHrHBHautwf+x6eU33OPhFzZ7EJpfM=; b=gKEc2Igj/dIU3XYsdZmKuWpqDTDhalfBFqvusffWTnJflZetocNWyiY5htZmI/0ooD CKsNe9DPn5CA8/mKI6etpbvy+K9ZI+Je/hx4GOl+0cKvCV2lN7SxVyuAybOEPxJTlZFs CfaRXQoXg4mAC2ga3pN5xeIXZ/LiWzZ9MXDrCJo7gC919jgrpKeCaHCv0c3FyF85Ff6F q6GhxR9QmKp2963tMFNvGWkhNSYEFE7PI/57QiWQ+mSEW7v6xshPq5ML9E60den2Mg4b LWhTzu3pCLbHIoKaGYSpaZvFrUO7gb16amSy80StlNyGGrZLEBlf+AX9ndFPcPDhWeag PdrQ== X-Gm-Message-State: AKGB3mKbAHqlUU/g9p2looeotJJOK96A53Q8cjYzbV1Ro4C+5X7knqfU jJ9dWHj2Uz5wFZXjrMkaHWk= X-Google-Smtp-Source: ACJfBosopdiDeq4Xt+wPvYkqeYuQejFx7u4YvfaJjpvTpcjfwDKwf5fb2uDcSMIFDcBFq7x+5rAN1Q== X-Received: by 10.129.181.8 with SMTP id t8mr33839455ywh.119.1514904621889; Tue, 02 Jan 2018 06:50:21 -0800 (PST) Received: from ?IPv6:2620:10d:c0a3:20fb:7500:e7fb:4a6f:2254? ([2620:10d:c091:200::2bbe]) by smtp.googlemail.com with ESMTPSA id g66sm20349176ywa.64.2018.01.02.06.50.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Jan 2018 06:50:20 -0800 (PST) To: GCC Patches From: Nathan Sidwell Subject: [C++ PATCH] tiny code cleanup Message-ID: <931ff9b9-776b-d195-fb68-bf240473fba0@acm.org> Date: Tue, 2 Jan 2018 09:50:19 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In working on c++/83160 I came across this use-once set-to-constant 'variable'. It made me go looking for a non-existent change to it, so I'm eliding it. nathan 2018-01-02 Nathan Sidwell * constexpr.c (cxx_bind_parameters_in_call): Remove unneeded local lval var. Index: constexpr.c =================================================================== --- constexpr.c (revision 256070) +++ constexpr.c (working copy) @@ -1291,8 +1291,7 @@ cxx_bind_parameters_in_call (const const x = ctx->object; x = build_address (x); } - bool lval = false; - arg = cxx_eval_constant_expression (ctx, x, lval, + arg = cxx_eval_constant_expression (ctx, x, /*lval=*/false, non_constant_p, overflow_p); /* Don't VERIFY_CONSTANT here. */ if (*non_constant_p && ctx->quiet)