Bug 2429571
| Summary: | bison + GCC 16 compiles can now fail with error: variable ‘yynerrs’ set but not used [-Werror=unused-but-set-variable=] | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Richard W.M. Jones <rjones> |
| Component: | bison | Assignee: | Richard W.M. Jones <rjones> |
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | arjun, pfrankli, suraj.ghimire7 |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | bison-3.8.2-14.fc44 | Doc Type: | --- |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2026-01-21 12:50:23 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Sorry, the commit I propose to backport is: https://github.com/akimd/bison/commit/a166d5450e3f47587b98f6005f9f5627dbe21a5b It's essentially a 2-line change. 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 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. |
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; | ^~~~~~~