This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Remove la_error


>>>>> "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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]