Commit aff5c451 by Jason Merrill Committed by Jason Merrill

re PR c++/11725 (Wrong return statement warning with -Wreturn-type in template class method)

        PR c++/11725
        * except.c (build_throw): In a template, set
        current_function_returns_abnormally.

From-SVN: r76104
parent 20c361f3
2004-01-16 Jason Merrill <jason@redhat.com>
PR c++/11725
* except.c (build_throw): In a template, set
current_function_returns_abnormally.
2004-01-17 Fred Fish <fnf@intrinsity.com> 2004-01-17 Fred Fish <fnf@intrinsity.com>
PR c++/11895 PR c++/11895
......
...@@ -621,7 +621,10 @@ build_throw (tree exp) ...@@ -621,7 +621,10 @@ build_throw (tree exp)
return exp; return exp;
if (processing_template_decl) if (processing_template_decl)
return build_min (THROW_EXPR, void_type_node, exp); {
current_function_returns_abnormally = 1;
return build_min (THROW_EXPR, void_type_node, exp);
}
if (exp == null_node) if (exp == null_node)
warning ("throwing NULL, which has integral, not pointer type"); warning ("throwing NULL, which has integral, not pointer type");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment