diff options
author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-05-16 09:37:21 +0000 |
---|---|---|
committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-05-16 09:37:21 +0000 |
commit | df8dfb05507eb871736cafc9715cd020a52ab760 (patch) | |
tree | 0441f888743a37ae399d012a85099a038029463f /gcc/cp/spew.c | |
parent | 4173a1ff8756ed2b84974d6c8f0c5b594ef2700f (diff) | |
download | gcc-df8dfb05507eb871736cafc9715cd020a52ab760.tar.gz |
cp:
* spew.c (read_token): Call yyerror on all unexpected tokens.
testsuite:
* g++.old-deja/g++.other/crash41.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42143 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/spew.c')
-rw-r--r-- | gcc/cp/spew.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/gcc/cp/spew.c b/gcc/cp/spew.c index 4a230f08298..7b88757db54 100644 --- a/gcc/cp/spew.c +++ b/gcc/cp/spew.c @@ -1,6 +1,6 @@ /* Type Analyzer for GNU C++. Copyright (C) 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000 Free Software Foundation, Inc. + 1999, 2000, 2001 Free Software Foundation, Inc. Hacked... nay, bludgeoned... by Mark Eichin (eichin@cygnus.com) This file is part of GNU CC. @@ -353,14 +353,9 @@ read_token (t) t->yychar = STRING; break; - /* These tokens should not survive translation phase 4. */ - case CPP_HASH: - case CPP_PASTE: - error ("syntax error before '#' token"); - goto retry; - default: - abort (); + yyerror ("parse error"); + goto retry; } t->lineno = lineno; |