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]: Boring reformatting


Some more tedious reformatting I made, and have now installed

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-01  Nathan Sidwell  <nathan@codesourcery.com>

	* parser.c (cp_parser_init_declarator,
	cp_paser_member_declaration): Reformat.
	* pt.c (lookup_template_class, type_unification_real, unify,
	type_dependent_expression_p): Reformat.

Index: cp/parser.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/parser.c,v
retrieving revision 1.95
diff -c -3 -p -r1.95 parser.c
*** cp/parser.c	1 Aug 2003 09:33:52 -0000	1.95
--- cp/parser.c	1 Aug 2003 14:24:47 -0000
*************** cp_parser_init_declarator (cp_parser* pa
*** 9268,9275 ****
    friend_p = cp_parser_friend_p (decl_specifiers);
  
    /* Check that the number of template-parameter-lists is OK.  */
!   if (!cp_parser_check_declarator_template_parameters (parser, 
! 						       declarator))
      return error_mark_node;
  
    /* Enter the newly declared entry in the symbol table.  If we're
--- 9268,9274 ----
    friend_p = cp_parser_friend_p (decl_specifiers);
  
    /* Check that the number of template-parameter-lists is OK.  */
!   if (!cp_parser_check_declarator_template_parameters (parser, declarator))
      return error_mark_node;
  
    /* Enter the newly declared entry in the symbol table.  If we're
*************** cp_parser_init_declarator (cp_parser* pa
*** 9284,9294 ****
  				       decl_specifiers);
  	  have_extern_spec = false;
  	}
!       decl = start_decl (declarator,
! 			 decl_specifiers,
! 			 is_initialized,
! 			 attributes,
! 			 prefix_attributes);
      }
  
    /* Enter the SCOPE.  That way unqualified names appearing in the
--- 9283,9290 ----
  				       decl_specifiers);
  	  have_extern_spec = false;
  	}
!       decl = start_decl (declarator, decl_specifiers,
! 			 is_initialized, attributes, prefix_attributes);
      }
  
    /* Enter the SCOPE.  That way unqualified names appearing in the
*************** cp_parser_member_declaration (cp_parser*
*** 11850,11859 ****
  	      else
  		{
  		  /* Create the declaration.  */
! 		  decl = grokfield (declarator, 
! 				    decl_specifiers, 
! 				    initializer,
! 				    asm_specification,
  				    attributes);
  		  /* Any initialization must have been from a
  		     constant-expression.  */
--- 11846,11853 ----
  	      else
  		{
  		  /* Create the declaration.  */
! 		  decl = grokfield (declarator, decl_specifiers, 
! 				    initializer, asm_specification,
  				    attributes);
  		  /* Any initialization must have been from a
  		     constant-expression.  */
Index: cp/pt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/pt.c,v
retrieving revision 1.746
diff -c -3 -p -r1.746 pt.c
*** cp/pt.c	1 Aug 2003 09:33:52 -0000	1.746
--- cp/pt.c	1 Aug 2003 14:26:06 -0000
*************** lookup_template_class (tree d1, 
*** 4126,4134 ****
  	       i > 0 && t != NULL_TREE;
  	       --i, t = TREE_CHAIN (t))
  	    {
! 	      tree a = coerce_template_parms (TREE_VALUE (t), arglist,
! 					      template, complain,
! 					      /*require_all_args=*/1);
  
  	      /* Don't process further if one of the levels fails.  */
  	      if (a == error_mark_node)
--- 4126,4134 ----
  	       i > 0 && t != NULL_TREE;
  	       --i, t = TREE_CHAIN (t))
  	    {
! 	      tree a = coerce_template_parms (TREE_VALUE (t),
! 					      arglist, template,
! 	                                      complain, /*require_all_args=*/1);
  
  	      /* Don't process further if one of the levels fails.  */
  	      if (a == error_mark_node)
*************** type_unification_real (tree tparms, 
*** 8786,8794 ****
    my_friendly_assert (TREE_CODE (tparms) == TREE_VEC, 289);
    my_friendly_assert (xparms == NULL_TREE 
  		      || TREE_CODE (xparms) == TREE_LIST, 290);
!   /* ARGS could be NULL.  */
!   if (xargs)
!     my_friendly_assert (TREE_CODE (xargs) == TREE_LIST, 291);
    my_friendly_assert (ntparms > 0, 292);
  
    switch (strict)
--- 8787,8793 ----
    my_friendly_assert (TREE_CODE (tparms) == TREE_VEC, 289);
    my_friendly_assert (xparms == NULL_TREE 
  		      || TREE_CODE (xparms) == TREE_LIST, 290);
!   my_friendly_assert (!xargs || TREE_CODE (xargs) == TREE_LIST, 291);
    my_friendly_assert (ntparms > 0, 292);
  
    switch (strict)
*************** unify (tree tparms, tree targs, tree par
*** 9489,9496 ****
  	       template <class T, class Allocator = allocator> 
  	       class vector.  */
  
! 	    if (coerce_template_parms (argtmplvec, parmvec, parmtmpl,
! 				       tf_none, 1) == error_mark_node)
  	      return 1;
  	  
  	    /* Deduce arguments T, i from TT<T> or TT<i>.  
--- 9488,9495 ----
  	       template <class T, class Allocator = allocator> 
  	       class vector.  */
  
! 	    if (coerce_template_parms (argtmplvec, parmvec, parmtmpl, 0, 1)
! 	        == error_mark_node)
  	      return 1;
  	  
  	    /* Deduce arguments T, i from TT<T> or TT<i>.  
*************** type_dependent_expression_p (tree expres
*** 11638,11645 ****
  	expression = BASELINK_FUNCTIONS (expression);
        if (TREE_CODE (expression) == TEMPLATE_ID_EXPR)
  	{
! 	  if (any_dependent_template_arguments_p (TREE_OPERAND (expression, 
! 								1)))
  	    return true;
  	  expression = TREE_OPERAND (expression, 0);
  	}
--- 11637,11644 ----
  	expression = BASELINK_FUNCTIONS (expression);
        if (TREE_CODE (expression) == TEMPLATE_ID_EXPR)
  	{
! 	  if (any_dependent_template_arguments_p
! 	      (TREE_OPERAND (expression, 1)))
  	    return true;
  	  expression = TREE_OPERAND (expression, 0);
  	}

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