re PR c++/34927 (Duplicate error message about abstract class)
authorPaolo Carlini <paolo.carlini@oracle.com>
Sun, 9 Oct 2011 00:21:37 +0000 (00:21 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Sun, 9 Oct 2011 00:21:37 +0000 (00:21 +0000)
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.

From-SVN: r179718

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

index 3d8442b1c2d12c0893986b41fadc30b0e2dd4592..2b03e473a956c4b5b8ce294aee7875f669feca3c 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 96b95c2b5cebd395ccd37b3890229ed273ace4b5..3accab621333011b63ad5a9480c89990381ed87a 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.  */