This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[C++] Fix 18981


This patch fixes 18981, and ICE caused by some unnecessary flag setting.
Those flags are already set by make_typename_type itself.

booted & tested on i686-pc-linux-gnu.

nathan

--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk

2004-12-15  Nathan Sidwell  <nathan@codesourcery.com>

	PR c++/18981
	* parser.c (cp_parser_lookup_name): Remove unneeded TYPENAME_TYPE
	flag setting.

Index: cp/parser.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/parser.c,v
retrieving revision 1.295
diff -c -3 -p -r1.295 parser.c
*** cp/parser.c	15 Dec 2004 00:42:33 -0000	1.295
--- cp/parser.c	15 Dec 2004 10:21:36 -0000
*************** cp_parser_lookup_name (cp_parser *parser
*** 14190,14199 ****
  		 is dependent.  */
  	      type = make_typename_type (parser->scope, name, tag_type,
  					 /*complain=*/1);
- 	      if (tag_type == enum_type)
- 		TYPENAME_IS_ENUM_P (type) = 1;
- 	      else if (tag_type != typename_type)
- 		TYPENAME_IS_CLASS_P (type) = 1;
  	      decl = TYPE_NAME (type);
  	    }
  	  else if (is_template)
--- 14190,14195 ----
// { dg-do compile }

// Copyright (C) 2004 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 14 Dec 2004 <nathan@codesourcery.com>

// PR 18981. ICE
// Origin:  Andreas Schwab <schwab@suse.de>

template <class T> 
struct tree { 
  struct iterator; 
  struct sibling_iterator { 
    friend struct tree<T>::iterator; 
  }; 
}; 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]