From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 98546 invoked by alias); 18 Jun 2018 14:48:06 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 97232 invoked by uid 89); 18 Jun 2018 14:48:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=throws, handy X-HELO: gateway33.websitewelcome.com Received: from gateway33.websitewelcome.com (HELO gateway33.websitewelcome.com) (192.185.146.87) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 18 Jun 2018 14:48:01 +0000 Received: from cm15.websitewelcome.com (cm15.websitewelcome.com [100.42.49.9]) by gateway33.websitewelcome.com (Postfix) with ESMTP id CCD1429B33 for ; Mon, 18 Jun 2018 09:47:59 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id UvRNfDIstbXuJUvRdfQN9p; Mon, 18 Jun 2018 09:47:59 -0500 X-Authority-Reason: nr=8 Received: from 75-166-79-120.hlrn.qwest.net ([75.166.79.120]:47264 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1fUvRN-0011r1-2b; Mon, 18 Jun 2018 09:47:33 -0500 From: Tom Tromey To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: [RFA] Remove la_error References: <20180603222828.19224-1-tom@tromey.com> Date: Mon, 18 Jun 2018 14:48:00 -0000 In-Reply-To: <20180603222828.19224-1-tom@tromey.com> (Tom Tromey's message of "Sun, 3 Jun 2018 16:28:28 -0600") Message-ID: <87a7rsjgmz.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-BWhitelist: no X-Source-L: No X-Exim-ID: 1fUvRN-0011r1-2b X-Source-Sender: 75-166-79-120.hlrn.qwest.net (bapiya) [75.166.79.120]:47264 X-Source-Auth: tom+tromey.com X-Email-Count: 10 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-SW-Source: 2018-06/txt/msg00455.txt.bz2 >>>>> "Tom" == Tom Tromey writes: Tom> While working on the parser code, I noticed that yyerror is exported Tom> from each parser. It is used by this code in parse.c: Tom> TRY Tom> { Tom> if (lang->la_parser (&ps)) Tom> lang-> la_error (NULL); Tom> } Tom> However, it seems to me that la_error will never be called here, Tom> because in every case, la_parser throws an exception on error -- each Tom> implementation of yyerror just calls error. Tom> So, this patch removes la_error and makes all the yyerror functions Tom> static. This is handy primarily because it makes it simpler to make Tom> the expression parsers pure. Tom> Tested by the buildbot. Ping. Tom