Hi again,
today I had a look to clone_function_decl & co, and came up with the
below. I understand DECL_DELETING_DESTRUCTOR_P would work as well...
Tested x86_64-linux.
Thanks,
Paolo.
///////////////////
2011-10-08 Paolo Carlini <paolo.carl...@oracle.com>
PR c++/34927
* typeck2.c (abstract_virtuals_error_sfinae): Don't produce duplicate
inform messages in case of cloned destructor.
Index: typeck2.c
===================================================================
--- typeck2.c (revision 179660)
+++ typeck2.c (working copy)
@@ -340,7 +340,10 @@ abstract_virtuals_error_sfinae (tree decl, tree ty
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. */