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++ PATCH] tidy


I've installed this, which tidies a couple of things that had accumulated.

tested on i686-pc-linux-gnu

nathan
--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
         The voices in my head said this was stupid too
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk

2003-08-15  Nathan Sidwell  <nathan@codesourcery.com>

	* decl.c (make_typename_type): Use my_friendly_assert.
	* pt.c (tsubst_aggr_type): Rearrange context substitution.

Index: cp/decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl.c,v
retrieving revision 1.1111
diff -c -3 -p -r1.1111 decl.c
*** cp/decl.c	7 Aug 2003 00:07:15 -0000	1.1111
--- cp/decl.c	15 Aug 2003 10:03:27 -0000
*************** make_typename_type (tree context, tree n
*** 5492,5500 ****
        error ("`%D' used without template parameters", name);
        return error_mark_node;
      }
!   if (TREE_CODE (name) != IDENTIFIER_NODE)
!     abort ();
! 
    if (TREE_CODE (context) == NAMESPACE_DECL)
      {
        /* We can get here from typename_sub0 in the explicit_template_type
--- 5492,5499 ----
        error ("`%D' used without template parameters", name);
        return error_mark_node;
      }
!   my_friendly_assert (TREE_CODE (name) == IDENTIFIER_NODE, 20030802);
!   
    if (TREE_CODE (context) == NAMESPACE_DECL)
      {
        /* We can get here from typename_sub0 in the explicit_template_type
Index: cp/pt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/pt.c,v
retrieving revision 1.754
diff -c -3 -p -r1.754 pt.c
*** cp/pt.c	10 Aug 2003 15:10:34 -0000	1.754
--- cp/pt.c	15 Aug 2003 10:04:12 -0000
*************** tsubst_aggr_type (tree t, 
*** 5586,5597 ****
  
  	  /* First, determine the context for the type we are looking
  	     up.  */
! 	  if (TYPE_CONTEXT (t) != NULL_TREE)
! 	    context = tsubst_aggr_type (TYPE_CONTEXT (t), args,
! 					complain,
  					in_decl, /*entering_scope=*/1);
- 	  else
- 	    context = NULL_TREE;
  
  	  /* Then, figure out what arguments are appropriate for the
  	     type we are trying to find.  For example, given:
--- 5590,5599 ----
  
  	  /* First, determine the context for the type we are looking
  	     up.  */
! 	  context = TYPE_CONTEXT (t);
! 	  if (context)
! 	    context = tsubst_aggr_type (context, args, complain,
  					in_decl, /*entering_scope=*/1);
  
  	  /* Then, figure out what arguments are appropriate for the
  	     type we are trying to find.  For example, given:

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