summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2013-04-08 21:16:09 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2013-04-08 21:16:09 +0000
commit5fc994ddea50531a26424c9f710ed52201100160 (patch)
tree9fb48e594484c5c7c68e5223259f1cdcb3e62495
parent3ff7f7e73ee3d4d153d1a1fcc317401797689236 (diff)
downloadgcc-5fc994ddea50531a26424c9f710ed52201100160.tar.gz
PR c++/56838
PR c++/17232 * typeck2.c (abstract_virtuals_error_sfinae): Disable complete_type again. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@197613 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/cp/ChangeLog7
-rw-r--r--gcc/cp/typeck2.c4
-rw-r--r--gcc/testsuite/g++.dg/template/abstract-dr337.C4
3 files changed, 13 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 8b9bf350c07..0604b550092 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,10 @@
+2013-04-04 Jason Merrill <jason@redhat.com>
+
+ PR c++/56838
+ PR c++/17232
+ * typeck2.c (abstract_virtuals_error_sfinae): Disable
+ complete_type again.
+
2013-04-08 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/56871
diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c
index d9efafb8515..5c2b1b22611 100644
--- a/gcc/cp/typeck2.c
+++ b/gcc/cp/typeck2.c
@@ -265,9 +265,13 @@ abstract_virtuals_error_sfinae (tree decl, tree type, abstract_class_use use,
return 0;
type = TYPE_MAIN_VARIANT (type);
+#if 0
+ /* Instantiation here seems to be required by the standard,
+ but breaks e.g. boost::bind. FIXME! */
/* In SFINAE, non-N3276 context, force instantiation. */
if (!(complain & (tf_error|tf_decltype)))
complete_type (type);
+#endif
/* 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
diff --git a/gcc/testsuite/g++.dg/template/abstract-dr337.C b/gcc/testsuite/g++.dg/template/abstract-dr337.C
index 6905262d6cb..4f66c1c1188 100644
--- a/gcc/testsuite/g++.dg/template/abstract-dr337.C
+++ b/gcc/testsuite/g++.dg/template/abstract-dr337.C
@@ -6,8 +6,8 @@ class A {
};
template<typename T>
-void g(T (*a)[1]) {} // { dg-error "abstract" "" }
+void g(T (*a)[1]) {} // { dg-error "abstract" "" { xfail *-*-* } }
int main() {
- g<A<int> >(0); // { dg-error "no matching function" }
+ g<A<int> >(0); // { dg-error "no matching function" "" { xfail *-*-* } }
}