Re: [PATCH] yacc.c: fix stack growth restriction for custom location types under C++

"James K. Lowden" <[email protected]> Wed, 29 Jul 2026 16:28:41 -0400
Newsgroups gmane.comp.parsers.bison.patches
Organization COBOLworx
Message-ID <[email protected]>
On Tue, 21 Jul 2026 12:54:51 -0700
Paul Eggert <[email protected]> wrote:

> I installed the attached patch, which  is a bit more elaborate as it
> attempts to port to older C++ environments and to uses without line
> numbers.

Thanks for the quick action, and apologies for the inadvertent
duplicate report.  

Confirmed the update works.  With it applied, and not setting
YYLTYPE_IS_TRIVIAL in the input, one program now compiles that
previously reported:

gcobol38.cbl:82:20: error: memory exhausted
   82 |            ELSE IF WRK-RECORD (1:1) = '@'
      |                    ^~~~~~~~~~~~
cobol1: error: failed compiling gcobol38.cbl

FYI, GCC COBOL in the master branch now uses the latest Bison release,
3.8.2.  If there is another release in 2026, I would recommend to the
GCC project that we use it, if only because we're already on the leading
edge, to avoid the YYLTYPE_IS_TRIVIAL dodge.  That would require
upgrading some GCC machines (and documentation), but does not affect
users as much, because the release tarball already includes the
generated Bison parser.  

Kind regards, 

--jkl