From aad02e522dc0f34c9c07174344c4af827a262fec Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Mon, 15 Jun 2026 08:31:15 -0400 Subject: [PATCH] Avoid bison compiler warning for yynerrs --- src/parser/parser.yy | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/parser/parser.yy b/src/parser/parser.yy index 02b6327..3889073 100644 --- a/src/parser/parser.yy +++ b/src/parser/parser.yy @@ -28,6 +28,12 @@ refptr parser_scope; %locations %define parse.error verbose +%initial-action { + /* Reference yynerrs so the generated parser does not warn that it is + set but never used; this grammar has no error-recovery rules. */ + (void) yynerrs; +} + %token PLUS; %token MINUS; %token TIMES;