This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C++ PATCH for c++/17232 (abstract class, array and sfinae)

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.


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:// 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]