http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61080

--- Comment #1 from Martin Jambor <jamborm at gcc dot gnu.org> ---
So for now I ended up with the following bit in my tree (it's easier
to add this than to fight Mozilla build system not to add Werrors).
Just checking DECL_DELETED_FN when emitting the error is not enough
because later on a similar warning in middle end tree-cfg.c is given
(control reaches end of non-void function).


diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index ffaff5c..56d0226 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -13992,6 +13992,9 @@ finish_function (int flags)
   if (!processing_template_decl)
     save_function_data (fndecl);

+  if (DECL_DELETED_FN (fndecl))
+    TREE_NO_WARNING (fndecl) = 1;
+
   /* Complain if there's just no return statement.  */
   if (warn_return_type
       && !VOID_TYPE_P (TREE_TYPE (fntype))

Reply via email to