This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[C++ PATCH]: fix bug 911
- To: gcc-patches at gcc dot gnu dot org
- Subject: [C++ PATCH]: fix bug 911
- From: Nathan Sidwell <nathan at codesourcery dot com>
- Date: Fri, 05 Jan 2001 16:38:16 +0000
- Organization: Codesourcery LLC
Hi,
I've installed the attached obvious fix for bug 911, where we iced
on erroneous code.
built & 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-01-05 Nathan Sidwell <nathan@codesourcery.com>
* parse.y (template_datadef): Check for error_mark_node.
Index: cp/parse.y
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/parse.y,v
retrieving revision 1.207
diff -c -3 -p -r1.207 parse.y
*** parse.y 2001/01/03 03:28:50 1.207
--- parse.y 2001/01/05 16:16:33
*************** template_datadef:
*** 696,703 ****
| typed_declspecs initdecls ';'
{ note_list_got_semicolon ($1.t); }
| structsp ';'
! { maybe_process_partial_specialization ($1.t);
! note_got_semicolon ($1.t); }
;
datadef:
--- 696,708 ----
| typed_declspecs initdecls ';'
{ note_list_got_semicolon ($1.t); }
| structsp ';'
! {
! if ($1.t != error_mark_node)
! {
! maybe_process_partial_specialization ($1.t);
! note_got_semicolon ($1.t);
! }
! }
;
datadef:
// Build don't link:
// Copyright (C) 2000 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 5 Jan 2001 <nathan@codesourcery.com>
// Bug 911, ICE on bogus template declaration
template <class T> class A<T>; // ERROR - not a template