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:
Akim Demaille
2018-10-23 08:50:44 +02:00
parent b5515215c1
commit 9d8fc7fd3e

View File

@@ -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));
}
}
}]])[