This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH for c++/17232 (abstract class, array and sfinae)
- From: Jason Merrill <jason at redhat dot com>
- To: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 17 Mar 2013 16:33:31 -0400
- Subject: Re: C++ PATCH for c++/17232 (abstract class, array and sfinae)
- References: <5144CA1F.8060605@redhat.com>
On 03/16/2013 03:38 PM, Jason Merrill wrote:
In SFINAE context, we need to instantiate a class so that we can tell
whether or not is abstract. Doing this in non-SFINAE context caused
problems, so I've made it conditional.
But it still causes problems, such as PR 56642. So I've reverted the
complete_type change for now.
Jason
commit 6a0649ab081f34f152517707c84d6be211757029
Author: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Sun Mar 17 20:32:17 2013 +0000
PR c++/17232
PR c++/56642
* typeck2.c (abstract_virtuals_error_sfinae): Revert complete_type
change for now.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196758 138bc75d-0d04-0410-961f-82ee72b054a4
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index 3bac67c..24b5593 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -265,10 +265,6 @@ abstract_virtuals_error_sfinae (tree decl, tree type, abstract_class_use use,
return 0;
type = TYPE_MAIN_VARIANT (type);
- /* In SFINAE context, force instantiation. */
- if (!(complain & tf_error))
- complete_type (type);
-
/* If the type is incomplete, we register it within a hash table,
so that we can check again once it is completed. This makes sense
only for objects for which we have a declaration or at least a