From 367f06ae31199b827781fff1027c44e37c7392ba Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Sun, 9 Oct 2011 00:21:37 +0000 Subject: [PATCH] re PR c++/34927 (Duplicate error message about abstract class) 2011-10-08 Paolo Carlini 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 | 6 ++++++ gcc/cp/typeck2.c | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 3d8442b1c2d..2b03e473a95 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2011-10-08 Paolo Carlini + + 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 PR c++/39164 diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c index 96b95c2b5ce..3accab62133 100644 --- a/gcc/cp/typeck2.c +++ b/gcc/cp/typeck2.c @@ -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. */ -- 2.11.4.GIT