From ae199bf10fc7f201c07593f4e4f85ec7f12d5764 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 15 Sep 2005 14:16:54 +0000 Subject: [PATCH] * data/glr.c (yyresolveValue): Add default case to pacify gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl. --- ChangeLog | 3 +++ data/glr.c | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 76152369..d7b4ff85 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2005-09-15 Paul Eggert + * data/glr.c (yyresolveValue): Add default case to pacify + gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl. + * NEWS: Document when yyparse started to return 2. * doc/bison.texinfo (Parser Function): Document when yyparse returns 2. diff --git a/data/glr.c b/data/glr.c index d2f19218..5bb8e2d0 100644 --- a/data/glr.c +++ b/data/glr.c @@ -1674,6 +1674,11 @@ yyresolveValue (yySemanticOption* yyoptionList, yyGLRStack* yystack, yybest = yyp; yymerge = yyfalse; break; + default: + /* This cannot happen so it is not worth a YYASSERT (false), + but some compilers complain if the default case is + omitted. */ + break; } yypp = &yyp->yynext; } -- 2.45.2