From f24adda313333714038bec83180443ffb4726786 Mon Sep 17 00:00:00 2001 From: John Gilmore Date: Thu, 19 Sep 1991 22:16:40 +0000 Subject: [PATCH] * c-exp.y, m2-exp.y: Lint. * m2-exp.y: Avoid using yytname[] which is a Bison-ism. --- gdb/c-exp.y | 2 ++ gdb/m2-exp.y | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gdb/c-exp.y b/gdb/c-exp.y index 5e2e4b7e75e..c7cf672c8a0 100644 --- a/gdb/c-exp.y +++ b/gdb/c-exp.y @@ -56,8 +56,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #define yyact c_act #define yyexca c_exca +/* Forward decls */ void yyerror (); static int parse_number (); +int yyparse (); /* #define YYDEBUG 1 */ diff --git a/gdb/m2-exp.y b/gdb/m2-exp.y index 070f7ab0269..5beefe6c8b1 100644 --- a/gdb/m2-exp.y +++ b/gdb/m2-exp.y @@ -56,8 +56,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #define yyact m2_act #define yyexca m2_exca +/* Forward decl's */ void yyerror (); static int yylex (); +int yyparse (); /* The sign of the number being parsed. */ int number_sign = 1; @@ -1122,8 +1124,7 @@ yyerror() if (yychar < 256) error("Invalid syntax in expression near character '%c'.",yychar); else - error("Invalid syntax in expression near a '%s'.", - yytname[yychar-255]); + error("Invalid syntax in expression"); } /* Table of operators and their precedences for printing expressions. */ -- 2.30.2