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]

Re: [C++ Patch] PR 58466


Hi,

On 10/11/2013 07:46 PM, Jason Merrill wrote:
How does a TEMPLATE_PARM_INDEX get this far? It should have been detected as dependent before this.
Thanks. Interesting. We get there from the convert_nontype_argument call at line 6453 of pt.c (in convert_template_argument) , which is protected by:

      else if (!dependent_template_arg_p (orig_arg)
           && !uses_template_parms (t))

thus dependent_template_arg_p (orig_arg) returns *false* for that tree. This is trivially the case because dependent_template_arg_p begins:

  if (!processing_template_decl)
    return false;

thus it doesn't go that far when processing_template_decl is 0. Otherwise it would return true.

Is this information already useful to you? Are we maybe failing to bump processing_template_decl somewhere while processing the specialization?

Thanks!
Paolo.


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