diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2019-10-01 01:28:45 -0700 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2019-10-02 07:10:03 +0200 |
commit | 4d9ff272cf4402540b8c75b393373b713ce76431 (patch) | |
tree | 032b51122a3ec972deb35b77815b2186af8925c6 /NEWS | |
parent | 2ca6b719674228fa2f77f6627e78111a757b83cc (diff) | |
download | bison-4d9ff272cf4402540b8c75b393373b713ce76431.tar.gz |
Prefer signed types for indexes in skeletons
* NEWS: Mention this.
* data/skeletons/c.m4 (b4_int_type):
Prefer char if it will do, and prefer signed types to unsigned if
either will do.
* data/skeletons/glr.c (yy_reduce_print): No need to
convert rule line to unsigned long.
(yyrecoverSyntaxError): Put action into an int to
avoid GCC warning of using a char subscript.
* data/skeletons/lalr1.cc (yy_lac_check_, yysyntax_error_):
Prefer ptrdiff_t to size_t.
* data/skeletons/yacc.c (b4_int_type):
Prefer signed types to unsigned if either will do.
* data/skeletons/yacc.c (b4_declare_parser_state_variables):
(YYSTACK_RELOCATE, YYCOPY, yy_lac_stack_realloc, yy_lac)
(yytnamerr, yysyntax_error, yyparse): Prefer ptrdiff_t to size_t.
(YYPTRDIFF_T, YYPTRDIFF_MAXIMUM): New macros.
(YYSIZE_T): Fix "! defined YYSIZE_T" typo.
(YYSIZE_MAXIMUM): Take the minimum of PTRDIFF_MAX and SIZE_MAX.
(YYSIZEOF): New macro.
(YYSTACK_GAP_MAXIMUM, YYSTACK_BYTES, YYSTACK_RELOCATE)
(yy_lac_stack_realloc, yyparse): Use it.
(YYCOPY, yy_lac_stack_realloc): Cast to YYSIZE_T to pacify GCC.
(yy_reduce_print): Use int instead of unsigned long when int
will do.
(yy_lac_stack_realloc): Prefer long to unsigned long when
either will do.
* tests/regression.at: Adjust to these changes.
Diffstat (limited to 'NEWS')
-rw-r--r-- | NEWS | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -40,6 +40,12 @@ GNU Bison NEWS The Java backend no longer emits code and data for parser tracing if the %define variable parse.trace is not defined. +*** Templates prefer signed integer types + + Bison templates now prefer signed to unsigned integer types when + either will do, as the signed types are less error-prone and allow + for better checking with 'gcc -fsanitize=undefined'. + * Noteworthy changes in release 3.4.2 (2019-09-12) [stable] ** Bug fixes |