Use MRB_PRId for NODE_NTH_REF; ref
@@ -3416,7 +3416,7 @@ backref_error(parser_state *p, node *n)
c = (int)(intptr_t)n->car;
if (c == NODE_NTH_REF) {
- yyerror_i(p, "can't set variable $%d", (int)(intptr_t)n->cdr);
+ yyerror_i(p, "can't set variable $%" MRB_PRId, (mrb_int)(intptr_t)n->cdr);
}
else if (c == NODE_BACK_REF) {
yyerror_i(p, "can't set variable $%c", (int)(intptr_t)n->cdr);
@@ -6291,7 +6291,7 @@ mrb_parser_dump(mrb_state *mrb, node *tree, int offset)
break;
case NODE_NTH_REF:
- printf("NODE_NTH_REF: $%d\n", (int)(intptr_t)tree);
+ printf("NODE_NTH_REF: $%" MRB_PRId "\n", (mrb_int)(intptr_t)tree);
break;
case NODE_ARG:
