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: template type deduction for non-dependent parameters


Geoffrey Keating wrote:

The comment also said that infinite recursion could occur.  I think
this is a left-over from when we used to fully instantiate templates,
including generating code, without any queuing.  Now we delay all
template instantiations until the end of compilation and we have
unit-at-a-time mode.  The only infinite recursion I can see would be
if the compiler tried to instantiate a conversion function in the call
to can_convert_arg and somehow ended up back in this code again; but
as far as I can see, that's impossible.

There can certainly be conversion functions that are templates, and thus would end up back in this code, but I'm not sure if you could get an infinite recursion this way.


Bootstrapped & tested on powerpc-darwin.  I'll wait a while for comments
before committing.

Have you run Plum-Hall on this? I think you have access, and that if you do, you should run those tests as this is a very tricky area, and I don't fully trust my own knowledge or our testsuite to catch things. Once that's done, or if, contrary to my belief, you don't actually have Plum-Hall, then this is OK.


--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304


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