[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
size_t -> YYSIZE_T typo in yacc.c
From: |
Paul Eggert |
Subject: |
size_t -> YYSIZE_T typo in yacc.c |
Date: |
Sun, 14 May 2006 22:13:53 -0700 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux) |
While looking into address@hidden's bug report I noticed an obvious
typo in yacc.c. I installed this fix:
2006-05-14 Paul Eggert <address@hidden>
* 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.
Index: data/yacc.c
===================================================================
RCS file: /cvsroot/bison/bison/data/yacc.c,v
retrieving revision 1.138
diff -p -u -r1.138 yacc.c
--- data/yacc.c 14 May 2006 20:40:34 -0000 1.138
+++ data/yacc.c 15 May 2006 05:09:22 -0000
@@ -800,7 +800,7 @@ yytnamerr (char *yyres, const char *yyst
{
if (*yystr == '"')
{
- size_t yyn = 0;
+ YYSIZE_T yyn = 0;
char const *yyp = yystr;
for (;;)
Index: tests/regression.at
===================================================================
RCS file: /cvsroot/bison/bison/tests/regression.at,v
retrieving revision 1.95
diff -p -u -r1.95 regression.at
--- tests/regression.at 23 Jan 2006 07:59:42 -0000 1.95
+++ tests/regression.at 15 May 2006 05:09:22 -0000
@@ -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. ##
## ------------------------- ##
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- size_t -> YYSIZE_T typo in yacc.c,
Paul Eggert <=