mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 09:13:04 +00:00
printf returns a signed int
* tests/local.at: Adjust location_print's signature.
This commit is contained in:
@@ -815,11 +815,11 @@ m4_define([b4_yy_location_print_define],
|
|||||||
|
|
||||||
YY_ATTRIBUTE_UNUSED
|
YY_ATTRIBUTE_UNUSED
|
||||||
]b4_function_define([yy_location_print_],
|
]b4_function_define([yy_location_print_],
|
||||||
[static unsigned],
|
[static int],
|
||||||
[[FILE *yyo], [yyo]],
|
[[FILE *yyo], [yyo]],
|
||||||
[[YYLTYPE const * const yylocp], [yylocp]])[
|
[[YYLTYPE const * const yylocp], [yylocp]])[
|
||||||
{
|
{
|
||||||
unsigned res = 0;
|
int res = 0;
|
||||||
int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
|
int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
|
||||||
if (0 <= yylocp->first_line)
|
if (0 <= yylocp->first_line)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -470,7 +470,7 @@ m4_define([AT_YYERROR_DECLARE(c)],
|
|||||||
[#include <stdio.h>
|
[#include <stdio.h>
|
||||||
]AT_LOCATION_IF([[
|
]AT_LOCATION_IF([[
|
||||||
#if defined ]AT_YYLTYPE[_IS_TRIVIAL && ]AT_YYLTYPE[_IS_TRIVIAL
|
#if defined ]AT_YYLTYPE[_IS_TRIVIAL && ]AT_YYLTYPE[_IS_TRIVIAL
|
||||||
static unsigned location_print (FILE *yyo, ]AT_YYLTYPE[ const * const yylocp);
|
static int location_print (FILE *yyo, ]AT_YYLTYPE[ const * const yylocp);
|
||||||
# ifndef LOCATION_PRINT
|
# ifndef LOCATION_PRINT
|
||||||
# define LOCATION_PRINT(File, Loc) location_print (File, &(Loc))
|
# define LOCATION_PRINT(File, Loc) location_print (File, &(Loc))
|
||||||
# endif
|
# endif
|
||||||
@@ -485,10 +485,10 @@ m4_define([AT_YYERROR_DEFINE(c)],
|
|||||||
# if defined ]AT_YYLTYPE[_IS_TRIVIAL && ]AT_YYLTYPE[_IS_TRIVIAL
|
# if defined ]AT_YYLTYPE[_IS_TRIVIAL && ]AT_YYLTYPE[_IS_TRIVIAL
|
||||||
/* Print *YYLOCP on YYO. */
|
/* Print *YYLOCP on YYO. */
|
||||||
__attribute__((__unused__))
|
__attribute__((__unused__))
|
||||||
static unsigned
|
static int
|
||||||
location_print (FILE *yyo, ]AT_YYLTYPE[ const * const yylocp)
|
location_print (FILE *yyo, ]AT_YYLTYPE[ const * const yylocp)
|
||||||
{
|
{
|
||||||
unsigned res = 0;
|
int res = 0;
|
||||||
int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
|
int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0;
|
||||||
if (0 <= yylocp->first_line)
|
if (0 <= yylocp->first_line)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user