From patchwork Mon Apr 15 15:21:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Merrill X-Patchwork-Id: 236639 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 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id E6C5B2C00FD for ; Tue, 16 Apr 2013 01:21:46 +1000 (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:subject:content-type; q= dns; s=default; b=iFtkRTA4W9Di9Neg8vR7P98Drq5fSgdUtwkrqWy1IQn2+g UFSprpA0VN87u1HPaTPNKRdakk5pC0PSj46zLx7xXPXUQbZ6MMbA5eQGOCoSw/1N Wvei1Bzp44Frcr92pgK07sp9YwYl9SBc2vEK1JyPAKK0x3bbjRnNDzU8lWnOk= 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:subject:content-type; s= default; bh=SU+A930le4eg5N7Va2vyylAEXRQ=; b=PJwZUZA80wP9zwrpsrRm xEwWnYEcjv1niqlsYyChyqrphdSwEUIHqjJqsmLjflZ1xJMH2OairQmVMSgZPGzJ XAqfrHdfHTRqlTJtmDdcIZK12tCfhLraPIsnPN9cgUhcIJqfa+SiX0zvASCOlXiB Fyt2ok84R851R45/E8qft/g= Received: (qmail 19142 invoked by alias); 15 Apr 2013 15:21:40 -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 19133 invoked by uid 89); 15 Apr 2013 15:21:39 -0000 X-Spam-SWARE-Status: No, score=-6.8 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_DNSWL_HI, RCVD_IN_HOSTKARMA_W, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 15 Apr 2013 15:21:38 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3FFLbZG012093 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 15 Apr 2013 11:21:37 -0400 Received: from [10.3.113.35] (ovpn-113-35.phx2.redhat.com [10.3.113.35]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r3FFLaKx012756 for ; Mon, 15 Apr 2013 11:21:37 -0400 Message-ID: <516C1AF7.4060601@redhat.com> Date: Mon, 15 Apr 2013 16:21:27 +0100 From: Jason Merrill User-Agent: Mozilla/5.0 (X11; Linux i686; rv:22.0) Gecko/20100101 Thunderbird/22.0a2 MIME-Version: 1.0 To: gcc-patches List Subject: Minor C++ PATCH to tsubst of DECLTYPE_TYPE X-Virus-Found: No While working on the latest 52748 patch, it occurred to me that using tsubst_expr for DECLTYPE_TYPE is wrong, since that function deals with statements; since we only have to deal with expressions there, tsubst_copy_and_build is a better choice. Tested x86_64-pc-linux-gnu, applying to trunk. commit b48d4d61ceffc2989f0ea1e32ca6e9cc41923b9c Author: Jason Merrill Date: Sun Apr 14 16:41:27 2013 +0200 * pt.c (tsubst) [DECLTYPE_TYPE]: Use tsubst_copy_and_build. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index ba386a2..411ca55 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -11770,9 +11770,10 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl) ++cp_unevaluated_operand; ++c_inhibit_evaluation_warnings; - type = tsubst_expr (DECLTYPE_TYPE_EXPR (t), args, - complain|tf_decltype, in_decl, - /*integral_constant_expression_p=*/false); + type = tsubst_copy_and_build (DECLTYPE_TYPE_EXPR (t), args, + complain|tf_decltype, in_decl, + /*function_p*/false, + /*integral_constant_expression*/false); --cp_unevaluated_operand; --c_inhibit_evaluation_warnings;