Bug 2429571 - bison + GCC 16 compiles can now fail with error: variable ‘yynerrs’ set but not used [-Werror=unused-but-set-variable=]
Summary: bison + GCC 16 compiles can now fail with error: variable ‘yynerrs’ set but n...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: bison
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-01-14 15:56 UTC by Richard W.M. Jones
Modified: 2026-01-21 12:50 UTC (History)
3 users (show)

Fixed In Version: bison-3.8.2-14.fc44
Clone Of:
Environment:
Last Closed: 2026-01-21 12:50:23 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2026-01-14 15:56:24 UTC
Since GCC 16 was added to Fedora, if you're using -Wall -Werror builds will now fail with:

index-parse.c: In function ‘yyparse’:
index-parse.c:1114:9: error: variable ‘yynerrs’ set but not used [-Werror=unused-but-set-variable=]
 1114 |     int yynerrs = 0;
      |         ^~~~~~~

This has already been fixed in bison upstream, but unfortunately not in any released version.  See:

https://github.com/akimd/bison/issues/89
https://github.com/akimd/bison/issues/103

I think we should backport this commit (since it is simple and not controversial).

If you want me to do this work, then assign this BZ to me.

Reproducible: Always

Steps to Reproduce:
Compile Bison-generated parser with new GCC 16 from Rawhide
Actual Results:
index-parse.c: In function ‘yyparse’:
index-parse.c:1114:9: error: variable ‘yynerrs’ set but not used [-Werror=unused-but-set-variable=]
 1114 |     int yynerrs = 0;
      |         ^~~~~~~

Comment 1 Richard W.M. Jones 2026-01-14 15:57:31 UTC
Sorry, the commit I propose to backport is:

https://github.com/akimd/bison/commit/a166d5450e3f47587b98f6005f9f5627dbe21a5b

It's essentially a 2-line change.

Comment 2 Richard W.M. Jones 2026-01-20 12:00:20 UTC
https://src.fedoraproject.org/rpms/bison/pull-request/6

Comment 4 Fedora Update System 2026-01-21 12:43:47 UTC
FEDORA-2026-43699e9cac (bison-3.8.2-14.fc44) has been submitted as an update to Fedora 44.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-43699e9cac

Comment 5 Fedora Update System 2026-01-21 12:50:23 UTC
FEDORA-2026-43699e9cac (bison-3.8.2-14.fc44) has been pushed to the Fedora 44 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.