diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2004-10-22 11:42:30 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2004-10-22 11:42:30 +0000 |
commit | 76aebc9f3e3d418ae396e0d4e2d0632f3df89927 (patch) | |
tree | eec4e88cf5defc14069be13e67e934ba7f9b5a69 /gcc/testsuite | |
parent | 26630a99dafdef4cd1bba28af0b37bc47d8aed13 (diff) | |
download | gcc-76aebc9f3e3d418ae396e0d4e2d0632f3df89927.zip gcc-76aebc9f3e3d418ae396e0d4e2d0632f3df89927.tar.gz gcc-76aebc9f3e3d418ae396e0d4e2d0632f3df89927.tar.bz2 |
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
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/parse/crash18.C | 7 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/parse/crash19.C | 7 |
3 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 676d8a6..205676b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2004-10-22 Nathan Sidwell <nathan@codesourcery.com> + + PR c++/18095 + * g++.dg/parse/crash18.C: New. + * g++.dg/parse/crash19.C: New. + 2004-10-22 Aaron W. LaFramboise <aaronavay62@aaronwl.com> * g++.dg/ext/dllimport1.C: Move dg-warnings. diff --git a/gcc/testsuite/g++.dg/parse/crash18.C b/gcc/testsuite/g++.dg/parse/crash18.C new file mode 100644 index 0000000..94be360 --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/crash18.C @@ -0,0 +1,7 @@ +// Copyright (C) 2004 Free Software Foundation, Inc. +// Contributed by Nathan Sidwell 20 Oct 2004 <nathan@codesourcery.com> + +// PR 18095: ICE +// Origin: Volker Reichelt <reichelt@gcc.gnu.org> + +struct A // { dg-error "expected" "" } diff --git a/gcc/testsuite/g++.dg/parse/crash19.C b/gcc/testsuite/g++.dg/parse/crash19.C new file mode 100644 index 0000000..cc50d95 --- /dev/null +++ b/gcc/testsuite/g++.dg/parse/crash19.C @@ -0,0 +1,7 @@ +// Copyright (C) 2004 Free Software Foundation, Inc. +// Contributed by Nathan Sidwell 20 Oct 2004 <nathan@codesourcery.com> + +// PR 18095: ICE +// Origin: Volker Reichelt <reichelt@gcc.gnu.org> + +struct A {} // { dg-error "expected" "" } |