This is the mail archive of the
mailing list for the GCC project.
Re: [C++ PATCH,committed] Fix PR17344 (missing tf_error check incoerce_template_parms)
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Kriang Lerdsuwanakij <lerdsuwa at users dot sourceforge dot net>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 15 Nov 2004 13:05:18 -0800
- Subject: Re: [C++ PATCH,committed] Fix PR17344 (missing tf_error check incoerce_template_parms)
- Organization: CodeSourcery, LLC
- References: <41973CC5.firstname.lastname@example.org>
Kriang Lerdsuwanakij wrote:
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.