This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ PATCH]Fix for bug 29,g++.oliva/partspec1.C (revised)
- To: Kriang Lerdsuwanakij <lerdsuwa at scf-fs dot usc dot edu>
- Subject: Re: [C++ PATCH]Fix for bug 29,g++.oliva/partspec1.C (revised)
- From: Jason Merrill <jason at redhat dot com>
- Date: 04 Dec 2000 12:26:27 +0000
- Cc: gcc-patches at gcc dot gnu dot org
- References: <Pine.GSO.4.21.0011292222420.2213-100000@aludra.usc.edu>
>>>>> "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