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]

Re: [C++ PATCH]Fix for bug 29,g++.oliva/partspec1.C (revised)


>>>>> "Kriang" == Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu> writes:

> ! 	  /* We're looking at an expression.  This can happen with
> ! 	     something like: 
  	   
> ! 	       template <int I>
> ! 	       void foo(S<I>, S<I + 2>);
  
> ! 	     This is a "nondeduced context":
  
> ! 	       [deduct.type]
  	   
> ! 	       The nondeduced contexts are:
  
> ! 	       --A type that is a template-id in which one or more of
> ! 	         the template-arguments is an expression that references
> ! 	         a template-parameter.  
  
> ! 	     In these cases, we assume deduction succeeded, but don't
> ! 	     actually infer any unifications.  */
> ! 
> ! 	  if (!uses_template_parms (parm))
> ! 	    {
> ! 	      while (TREE_CODE (arg) == NOP_EXPR)
> ! 		arg = TREE_OPERAND (arg, 0);
> ! 
> ! 	      if (!template_args_equal (parm, arg))
> ! 		return 1;
> ! 	    }

Rather than strip the NOP_EXPR here, fix template_args_equal to deal
properly.

Jason

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