]> git.saurik.com Git - bison.git/commit - data/lalr1.cc
portability: fix pointer arithmetic to conform to C standard.
authorJoel E. Denny <jdenny@clemson.edu>
Sat, 3 Apr 2010 18:58:22 +0000 (14:58 -0400)
committerJoel E. Denny <jdenny@clemson.edu>
Sat, 10 Apr 2010 01:08:37 +0000 (21:08 -0400)
commita005dbcbe34382c2b9cb3075e83aa79ac2e651b4
tree3661d0c2528bb8241ae85ebc70bff6d21d4cd44a
parent8a8b33e8d2db49a9246deb46cb583a1a33594f36
portability: fix pointer arithmetic to conform to C standard.

Reported by Tys Lefering at
<http://lists.gnu.org/archive/html/bug-bison/2010-03/msg00035.html>.
This fix is already implemented in glr.c and does not apply to
lalr1.java.
* data/lalr1.cc (yy::parser::parse): Increase size of
yyerror_range and adjust subscripting so you don't have to
subtract one from the beginning of the array.
* data/yacc.c (b4_declare_parser_state_variables,
yyparse, yypush_parse): Likewise.
(cherry picked from commit 48f4100a8299918a3abc9c5d29db85319cad3cee)

Conflicts:

data/yacc.c
src/parse-gram.c
src/parse-gram.h
ChangeLog
data/lalr1.cc
data/yacc.c
src/parse-gram.c
src/parse-gram.h