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,committed] Fix PR17344 (missing tf_error check incoerce_template_parms)


Kriang Lerdsuwanakij wrote:

Hi

This patch fixes PR17344.  We simply fail to check tf_error
when emiting an error message in coerce_template_parms,
causing failure when looking for a good overload candidate.

Tested on i686-pc-linux-gnu. Committed to mainline as obvious.

I'm not convinced this is the right fix.


Checks against tf_error should be done only for those cases specifically listed in the standard in the section on SFINAE. It is not the case that no errors should be issued when tf_error is set. It is merely the case that if either template argument-deduction or checking fails, then SFINAE applies. I see no evidence that this case is such a situation. Can you justify that? If not, please revert your patch.

Furthermore, this kind of patch is *never obvious*. Please get a review on all such patches in future.

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


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