aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2004-01-18 10:38:08 -0500
committerJason Merrill <jason@gcc.gnu.org>2004-01-18 10:38:08 -0500
commitaff5c451d2efb9d3a545eef0d0d5f9068fbf5d91 (patch)
tree52cf682bb02141af35de53b2ece33f22032f2c90 /gcc
parent20c361f30eabe19869e6d2f338785e81866c3176 (diff)
downloadgcc-aff5c451d2efb9d3a545eef0d0d5f9068fbf5d91.zip
gcc-aff5c451d2efb9d3a545eef0d0d5f9068fbf5d91.tar.gz
gcc-aff5c451d2efb9d3a545eef0d0d5f9068fbf5d91.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/except.c5
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index a6e2c25..acc0bd4 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+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>
PR c++/11895
diff --git a/gcc/cp/except.c b/gcc/cp/except.c
index 03a3274..8e03259 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");