2011-10-08 Paolo Carlini <paolo.carlini@oracle.com>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 9 Oct 2011 00:21:37 +0000 (00:21 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 9 Oct 2011 00:21:37 +0000 (00:21 +0000)
PR c++/34927
* typeck2.c (abstract_virtuals_error_sfinae): Don't produce duplicate
inform messages in case of cloned destructor.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@179718 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/typeck2.c

index 3d8442b..2b03e47 100644 (file)
@@ -1,3 +1,9 @@
+2011-10-08  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       PR c++/34927
+       * typeck2.c (abstract_virtuals_error_sfinae): Don't produce duplicate
+       inform messages in case of cloned destructor.
+
 2011-10-06  Jason Merrill  <jason@redhat.com>
 
        PR c++/39164
index 96b95c2..3accab6 100644 (file)
@@ -340,7 +340,10 @@ abstract_virtuals_error_sfinae (tree decl, tree type, tsubst_flags_t complain)
              type);
 
       FOR_EACH_VEC_ELT (tree, pure, ix, fn)
-       inform (input_location, "\t%+#D", fn);
+       if (! DECL_CLONED_FUNCTION_P (fn)
+           || DECL_COMPLETE_DESTRUCTOR_P (fn))
+         inform (input_location, "\t%+#D", fn);
+
       /* Now truncate the vector.  This leaves it non-null, so we know
         there are pure virtuals, but empty so we don't list them out
         again.  */