diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2019-09-28 13:48:35 +0200 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2019-09-30 18:31:55 +0200 |
commit | 2ca6b719674228fa2f77f6627e78111a757b83cc (patch) | |
tree | 3b6f8b94e91f03f2625d0cfe494712ed0672fdfa /THANKS | |
parent | 871c02b327d16bf131ab5352aa9f23650604a4d4 (diff) | |
download | bison-2ca6b719674228fa2f77f6627e78111a757b83cc.tar.gz |
yacc: use the most appropriate integral type for state numbers
Currently we properly use the "best" integral type for tables,
including those storing state numbers. However the variables for
state numbers used in yyparse (and its dependencies such as
yy_stack_print) still use int16_t invariably. As a consequence, very
large models overflow these variables.
Let's use the "best" type for these variables too. It turns out that
we can still use 16 bits for twice larger automata: stick to unsigned
types.
However using 'unsigned' when 16 bits are not enough is troublesome
and generates tons of warnings about signedness issues. Instead,
let's use 'int'.
Reported by Tom Kramer.
https://lists.gnu.org/archive/html/bug-bison/2019-09/msg00018.html
* data/skeletons/yacc.c (b4_state_num_type): New.
(yy_state_num): Be computed from YYNSTATES.
* tests/linear: New.
* tests/torture.at (State number type): New.
Use it.
Diffstat (limited to 'THANKS')
-rw-r--r-- | THANKS | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -179,6 +179,7 @@ Tim Landscheidt tim@tim-landscheidt.de Tim Van Holder tim.van.holder@pandora.be Tobias Frost tobi@debian.org Todd Freed todd.freed@gmail.com +Tom Kramer kramer@nist.gov Tom Lane tgl@sss.pgh.pa.us Tom Tromey tromey@cygnus.com Tomasz Kłoczko kloczko.tomasz@gmail.com |