diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2011-10-09 00:21:37 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2011-10-09 00:21:37 +0000 |
commit | 367f06ae31199b827781fff1027c44e37c7392ba (patch) | |
tree | f0ada36492df3d9d28f13b3e6fdfb0ff5bed4cf6 /gcc | |
parent | 6d482d2eaa6e6b57578c530de67edb6b5b3e4f24 (diff) | |
download | gcc-367f06ae31199b827781fff1027c44e37c7392ba.zip gcc-367f06ae31199b827781fff1027c44e37c7392ba.tar.gz gcc-367f06ae31199b827781fff1027c44e37c7392ba.tar.bz2 |
re PR c++/34927 (Duplicate error message about abstract class)
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/typeck2.c | 5 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 3d8442b..2b03e47 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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 diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c index 96b95c2..3accab6 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. */ |