From patchwork Fri Nov 4 19:23:07 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 123695 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]) by ozlabs.org (Postfix) with SMTP id 0ECD5B6F76 for ; Sat, 5 Nov 2011 06:23:39 +1100 (EST) Received: (qmail 6629 invoked by alias); 4 Nov 2011 19:23:36 -0000 Received: (qmail 6617 invoked by uid 22791); 4 Nov 2011 19:23:35 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, SPF_HELO_PASS, TW_TM, TW_TX X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 04 Nov 2011 19:23:09 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pA4JN8VZ001325 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 4 Nov 2011 15:23:08 -0400 Received: from anchor.twiddle.net (vpn-225-81.phx2.redhat.com [10.3.225.81]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id pA4JN83s019582; Fri, 4 Nov 2011 15:23:08 -0400 Message-ID: <4EB43B9B.6060606@redhat.com> Date: Fri, 04 Nov 2011 12:23:07 -0700 From: Richard Henderson User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0) Gecko/20110927 Thunderbird/7.0 MIME-Version: 1.0 To: Jason Merrill CC: Aldy Hernandez , gcc-patches Subject: Re: [patch] 15/n: trans-mem: compiler C++ changes References: <4EB2E310.7010009@redhat.com> <4EB409EF.4040804@redhat.com> <4EB42C10.7090509@redhat.com> <4EB42CC1.1030205@redhat.com> <4EB42F82.1010309@redhat.com> In-Reply-To: <4EB42F82.1010309@redhat.com> X-IsSubscribed: yes 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 On 11/04/2011 11:31 AM, Jason Merrill wrote: > Speaking of which, that function's comment doesn't match the code: > >> + transaction-expression: >> + __transaction_atomic txn-exception-spec[opt] compound-statement >> + __transaction_relaxed txn-exception-spec[opt] compound-statement Fixed. >> + function-definition: >> + decl-specifier-seq [opt] declarator function-atomic-block > > function-atomic-block should be function-transaction-block, right? Yes. The spec has changed a couple of times, and the comments didn't make all the same changes. r~ * cp/parser.c (cp_parser_init_declarator): Fix production comments. (cp_parser_transaction_expression): Don't parse txn-attributes here. diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index d7cdb9c..ed70178 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -15116,7 +15116,7 @@ cp_parser_asm_definition (cp_parser* parser) TM Extension: function-definition: - decl-specifier-seq [opt] declarator function-atomic-block + decl-specifier-seq [opt] declarator function-transaction-block The DECL_SPECIFIERS apply to this declarator. Returns a representation of the entity declared. If MEMBER_P is TRUE, then @@ -26652,7 +26652,7 @@ cp_parser_transaction_expression (cp_parser *parser, enum rid keyword) unsigned char old_in = parser->in_transaction; unsigned char this_in = 1; cp_token *token; - tree ret, attrs; + tree ret; gcc_assert (keyword == RID_TRANSACTION_ATOMIC || keyword == RID_TRANSACTION_RELAXED); @@ -26663,12 +26663,6 @@ cp_parser_transaction_expression (cp_parser *parser, enum rid keyword) if (keyword == RID_TRANSACTION_RELAXED) this_in |= TM_STMT_ATTR_RELAXED; - else - { - attrs = cp_parser_txn_attribute_opt (parser); - if (attrs) - this_in |= parse_tm_stmt_attr (attrs, 0); - } parser->in_transaction = this_in; if (cp_lexer_next_token_is (parser->lexer, CPP_OPEN_PAREN))