This avoids a diagnostic from gcc -Wswitch-enum.
Problem reported by twlevo@xs4all.nl.
2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
+ * data/glr.c (YYCHK1): Do not assume YYE is in range.
+ This avoids a diagnostic from gcc -Wswitch-enum.
+ Problem reported by twlevo@xs4all.nl.
+
* doc/bison.texinfo: Don't use "filename", as per GNU coding
standards. Use "file name" or "file" or "name", depending on
the context.
* doc/bison.texinfo: Don't use "filename", as per GNU coding
standards. Use "file name" or "file" or "name", depending on
the context.
#define YYCHK1(YYE) \
do { \
switch (YYE) { \
#define YYCHK1(YYE) \
do { \
switch (YYE) { \
break; \
case yyabort: \
goto yyabortlab; \
break; \
case yyabort: \
goto yyabortlab; \
goto yyacceptlab; \
case yyerr: \
goto yyuser_error; \
goto yyacceptlab; \
case yyerr: \
goto yyuser_error; \
+ default: \
+ goto yybuglab; \
yyresult = 0;
goto yyreturn;
yyresult = 0;
goto yyreturn;
+ yybuglab:
+ YYASSERT (yyfalse);
+ /* Fall through. */
+
yyabortlab:
yyresult = 1;
goto yyreturn;
yyabortlab:
yyresult = 1;
goto yyreturn;