mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
yacc.c: work around strange typing issues
On the CI, both GCC and Clang report:
src/parse-gram.c: In function 'yy_lac':
src/parse-gram.c:1479:29: error: format '%hd' expects argument of type 'int',
but argument 3 has type 'yytype_int16 {aka long int}' [-Werror=format=]
YYDPRINTF ((stderr, " G%hd", yystate));
^
Although yytype_int16 is supposed to be a short int, not a long int.
This must be explored.
* data/yacc.c (yy_lac): Work around typing issue.
This commit is contained in:
@@ -997,7 +997,7 @@ yy_lac (yytype_int16 *yyesa, yytype_int16 **yyes,
|
||||
}
|
||||
*++yyesp = yystate;
|
||||
}
|
||||
YYDPRINTF ((stderr, " G%hd", yystate));
|
||||
YYDPRINTF ((stderr, " G%d", (int) yystate));
|
||||
}
|
||||
}
|
||||
}]])[
|
||||
|
||||
Reference in New Issue
Block a user