[C++ PATCH]: Fix bug 2744
Nathan Sidwell
nathan@codesourcery.com
Wed May 16 02:46:00 GMT 2001
Hi,
I've installed this obvious patch on both branch and mainline. It fixes
regression 2744 where we ICE'd on finding an unexpected thing cpplib
tokenized.
boothed & tested on i686-pc-linux-gnu.
nathan
--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org
2001-05-10 Nathan Sidwell <nathan@codesourcery.com>
* spew.c (read_token): Call yyerror on all unexpected tokens.
Index: cp/spew.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/spew.c,v
retrieving revision 1.47
diff -c -3 -p -r1.47 spew.c
*** spew.c 2001/05/01 10:53:09 1.47
--- spew.c 2001/05/10 08:01:55
***************
*** 1,6 ****
/* Type Analyzer for GNU C++.
Copyright (C) 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
! 1999, 2000 Free Software Foundation, Inc.
Hacked... nay, bludgeoned... by Mark Eichin (eichin@cygnus.com)
This file is part of GNU CC.
--- 1,6 ----
/* Type Analyzer for GNU C++.
Copyright (C) 1987, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
! 1999, 2000, 2001 Free Software Foundation, Inc.
Hacked... nay, bludgeoned... by Mark Eichin (eichin@cygnus.com)
This file is part of GNU CC.
*************** read_token (t)
*** 353,366 ****
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 ();
}
t->lineno = lineno;
--- 353,361 ----
t->yychar = STRING;
break;
default:
! yyerror ("parse error");
! goto retry;
}
t->lineno = lineno;
More information about the Gcc-patches
mailing list