re PR c++/11725 (Wrong return statement warning with -Wreturn-type in template class...
authorJason Merrill <jason@redhat.com>
Sun, 18 Jan 2004 15:38:08 +0000 (10:38 -0500)
committerJason Merrill <jason@gcc.gnu.org>
Sun, 18 Jan 2004 15:38:08 +0000 (10:38 -0500)
        PR c++/11725
        * except.c (build_throw): In a template, set
        current_function_returns_abnormally.

From-SVN: r76104

gcc/cp/ChangeLog
gcc/cp/except.c

index a6e2c25a4f5137b858354273b0703e6435c1b237..acc0bd47647e9b4489d44e397339641a3a246f21 100644 (file)
@@ -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
index 03a3274e90a54af161e8f72cd2736e276a1c6d3d..8e032599e3136683d33a8a62e7d932f0a85745f6 100644 (file)
@@ -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");