From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1084 invoked by alias); 13 Nov 2018 15:40:15 -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 1067 invoked by uid 89); 13 Nov 2018 15:40:13 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= 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 ESMTP; Tue, 13 Nov 2018 15:40:12 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 54F60753FB; Tue, 13 Nov 2018 15:40:11 +0000 (UTC) Received: from redhat.com (unknown [10.20.4.212]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BC4595D756; Tue, 13 Nov 2018 15:40:10 +0000 (UTC) Date: Tue, 13 Nov 2018 15:40:00 -0000 From: Marek Polacek To: Umesh Kalappa Cc: gcc-patches@gcc.gnu.org Subject: Re: Bug 52869 - [DR 1207] "this" not being allowed in noexcept clauses Message-ID: <20181113154008.GE28582@redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-SW-Source: 2018-11/txt/msg01116.txt.bz2 On Tue, Nov 13, 2018 at 11:49:55AM +0530, Umesh Kalappa wrote: > Hi All, > > the following patch fix the subjected issue > > Index: gcc/cp/parser.c > =================================================================== > --- gcc/cp/parser.c (revision 266026) > +++ gcc/cp/parser.c (working copy) > @@ -24615,6 +24615,8 @@ > { > tree expr; > cp_lexer_consume_token (parser->lexer); > + > + inject_this_parameter (current_class_type, TYPE_UNQUALIFIED); > > if (cp_lexer_peek_token (parser->lexer)->type == CPP_OPEN_PAREN) > { > > > ok to commit along the testcase with changelog update ? Thanks for the patch. Please also include the testcase along with the patch (and I think it should also test noexcept in a template). Please also include a ChangeLog entry in the patch submission. Can you describe how this patch has been tested? Further, wouldn't it be better to call inject_this_parameter inside the CPP_OPEN_PAREN block? If noexcept doesn't have any expression, then it can't refer to "this". Marek