From: Jason Merrill Date: Sun, 18 Jan 2004 15:38:08 +0000 (-0500) Subject: re PR c++/11725 (Wrong return statement warning with -Wreturn-type in template class... X-Git-Tag: releases/gcc-4.0.0~10956 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=aff5c451d2efb9d3a545eef0d0d5f9068fbf5d91;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index a6e2c25a4f51..acc0bd47647e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2004-01-16 Jason Merrill + + PR c++/11725 + * except.c (build_throw): In a template, set + current_function_returns_abnormally. + 2004-01-17 Fred Fish PR c++/11895 diff --git a/gcc/cp/except.c b/gcc/cp/except.c index 03a3274e90a5..8e032599e313 100644 --- a/gcc/cp/except.c +++ b/gcc/cp/except.c @@ -621,7 +621,10 @@ build_throw (tree exp) return exp; 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) warning ("throwing NULL, which has integral, not pointer type");