From: Jens Vollinga Date: Tue, 21 Jun 2011 19:36:16 +0000 (+0200) Subject: Made yyerror() string argument constant to avoid an compile error with X-Git-Tag: release_1-6-1~2 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=7a7b485ed57429bb21e7591f4a1b0454dd1f4aae Made yyerror() string argument constant to avoid an compile error with gcc 4.6. --- diff --git a/ginsh/ginsh.h b/ginsh/ginsh.h index fdf9e08b..92a53b45 100644 --- a/ginsh/ginsh.h +++ b/ginsh/ginsh.h @@ -56,7 +56,7 @@ using namespace GiNaC; #define YYSTYPE ex // lex functions/variables -extern int yyerror(char *s); +extern int yyerror(const char *s); extern int yylex(void); extern char *yytext; extern FILE *yyin; diff --git a/ginsh/ginsh_parser.yy b/ginsh/ginsh_parser.yy index 5fc18857..ab300a42 100644 --- a/ginsh/ginsh_parser.yy +++ b/ginsh/ginsh_parser.yy @@ -304,7 +304,7 @@ row : exp {$$ = lst($1);} %% // Error print routine -int yyerror(char *s) +int yyerror(const char *s) { cerr << s << " at " << yytext << endl; return 0;