ripper.y: get rid of compile error

yystpcpy is always used by yysyntax_error in bison 2.3, but may
not used by other than yytnamerr in newer bison.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2019-01-22 07:25:08 +00:00
Родитель 3dc6efbe9c
Коммит 4e64c54728
1 изменённых файлов: 2 добавлений и 3 удалений

Просмотреть файл

@ -611,9 +611,6 @@ rb_strterm_mark(VALUE obj)
#define yytnamerr(yyres, yystr) (YYSIZE_T)rb_yytnamerr(yyres, yystr) #define yytnamerr(yyres, yystr) (YYSIZE_T)rb_yytnamerr(yyres, yystr)
size_t rb_yytnamerr(char *yyres, const char *yystr); size_t rb_yytnamerr(char *yyres, const char *yystr);
#ifdef RIPPER
#define yystpcpy Not used
#endif
#define TOKEN2ID(tok) ( \ #define TOKEN2ID(tok) ( \
tTOKEN_LOCAL_BEGIN<(tok)&&(tok)<tTOKEN_LOCAL_END ? TOKEN2LOCALID(tok) : \ tTOKEN_LOCAL_BEGIN<(tok)&&(tok)<tTOKEN_LOCAL_END ? TOKEN2LOCALID(tok) : \
@ -11650,6 +11647,8 @@ Init_ripper(void)
id_warning = rb_intern_const("warning"); id_warning = rb_intern_const("warning");
id_gets = rb_intern_const("gets"); id_gets = rb_intern_const("gets");
(void)yystpcpy; /* may not used in newer bison */
InitVM(ripper); InitVM(ripper);
} }