From 276f48df88293dc0a67237d1124a26e0f9ee82fb Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 15 May 2006 05:10:06 +0000 Subject: [PATCH] * data/yacc.c (yytnamerr): Fix typo: local var should be of type YYSIZE_T, not size_t. * tests/regression.at (Trivial grammars): New test, to catch the error fixed by the above patch. --- ChangeLog | 7 +++++++ data/yacc.c | 2 +- tests/regression.at | 26 ++++++++++++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6d8e7d4e..bd61223b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-05-14 Paul Eggert + + * data/yacc.c (yytnamerr): Fix typo: local var should be of type + YYSIZE_T, not size_t. + * tests/regression.at (Trivial grammars): New test, to catch + the error fixed by the above patch. + 2006-05-14 Akim Demaille * doc/bison.texinfo (C++ Bison Interface): Clarify the naming diff --git a/data/yacc.c b/data/yacc.c index ed4e4e95..61e2fddf 100644 --- a/data/yacc.c +++ b/data/yacc.c @@ -800,7 +800,7 @@ yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { - size_t yyn = 0; + YYSIZE_T yyn = 0; char const *yyp = yystr; for (;;) diff --git a/tests/regression.at b/tests/regression.at index b1a3d56b..5e68b95c 100644 --- a/tests/regression.at +++ b/tests/regression.at @@ -21,6 +21,32 @@ AT_BANNER([[Regression tests.]]) +## ------------------ ## +## Trivial grammars. ## +## ------------------ ## + +AT_SETUP([Trivial grammars]) + +AT_DATA_GRAMMAR([input.y], +[[%{ +void yyerror (char const *); +int yylex (void); +%} + +%error-verbose + +%% + +program: 'x'; +]]) + +AT_CHECK([bison -o input.c input.y]) +AT_COMPILE([input.o], [-c input.c]) + +AT_CLEANUP + + + ## ------------------------- ## ## Early token definitions. ## ## ------------------------- ## -- 2.47.2