]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR c++/18095 (ICE in cp_lexer_consume_token on missing ";")
authorNathan Sidwell <nathan@codesourcery.com>
Fri, 22 Oct 2004 11:42:30 +0000 (11:42 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Fri, 22 Oct 2004 11:42:30 +0000 (11:42 +0000)
commit76aebc9f3e3d418ae396e0d4e2d0632f3df89927
treeeec4e88cf5defc14069be13e67e934ba7f9b5a69
parent26630a99dafdef4cd1bba28af0b37bc47d8aed13
re PR c++/18095 (ICE in cp_lexer_consume_token on missing ";")

cp:
PR c++/18095
* parser.c (eof_token): Make const, correctly initialize rid and
location fields.
(struct cp_lexer): Replace buffer_end pointer with buffer_length
count. Adjust.
(cp_lexer_new_main): Directly grow lexer's buffer here.  Don't
zero it out.
(cp_lexer_new_from_tokens): Adjust.
(cp_lexer_grow_buffer): Remove.
(cp_lexer_peek_nth_token, cp_lexer_consume_token,
cp_lexer_purge_token): Add const casts.
testsuite:
PR c++/18095
* g++.dg/parse/crash18.C: New.
* g++.dg/parse/crash19.C: New.

From-SVN: r89439
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/parse/crash18.C [new file with mode: 0644]
gcc/testsuite/g++.dg/parse/crash19.C [new file with mode: 0644]