Landing: 172f855520d9
Project / Subsystem
gcc / cobol
Date
2026-07-21
Author
James K. Lowden
Commit
172f855520d9468ef7e0e8b39ba7409d68e7acc8
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- cobol
- patch_id
- —
- commit_hash
- 172f855520d9468ef7e0e8b39ba7409d68e7acc8
- source_type
- github
- headline
- Enable Bison parser stack growth for C++ compilation.
- tldr
- Work around Bison parser stack overflow in C++ by enabling stack growth.
- author
- James K. Lowden
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • cobol
- • bison
- • compiler-frontend
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-07-21T00:00:00.000Z
This commit addresses an issue where the COBOL front-end, when compiled with a C++ compiler, could abort with a ‘memory exhausted’ error on large programs. This occurs because Bison, by default, does not emit stack-growth logic when __cplusplus is defined. The fix involves defining the undocumented YYLTYPE_IS_TRIVIAL variable to enable stack growth, ensuring the parser can handle larger inputs without crashing. A static assert verifies the type’s requirements.