This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Remove la_error
- From: Tom Tromey <tom at tromey dot com>
- To: Tom Tromey <tom at tromey dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 18 Jun 2018 08:47:32 -0600
- Subject: Re: [RFA] Remove la_error
- References: <20180603222828.19224-1-tom@tromey.com>
>>>>> "Tom" == Tom Tromey <tom@tromey.com> 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