diff --git a/data/c.m4 b/data/c.m4 index b8d09621..2ec6ceea 100644 --- a/data/c.m4 +++ b/data/c.m4 @@ -815,11 +815,11 @@ m4_define([b4_yy_location_print_define], YY_ATTRIBUTE_UNUSED ]b4_function_define([yy_location_print_], - [static unsigned], + [static int], [[FILE *yyo], [yyo]], [[YYLTYPE const * const yylocp], [yylocp]])[ { - unsigned res = 0; + int res = 0; int end_col = 0 != yylocp->last_column ? yylocp->last_column - 1 : 0; if (0 <= yylocp->first_line) { diff --git a/tests/local.at b/tests/local.at index 6fbaaa91..7ab7dbfc 100644 --- a/tests/local.at +++ b/tests/local.at @@ -470,7 +470,7 @@ m4_define([AT_YYERROR_DECLARE(c)], [#include ]AT_LOCATION_IF([[ #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 # define LOCATION_PRINT(File, Loc) location_print (File, &(Loc)) # endif @@ -485,10 +485,10 @@ m4_define([AT_YYERROR_DEFINE(c)], # if defined ]AT_YYLTYPE[_IS_TRIVIAL && ]AT_YYLTYPE[_IS_TRIVIAL /* Print *YYLOCP on YYO. */ __attribute__((__unused__)) -static unsigned +static int 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; if (0 <= yylocp->first_line) {