re PR c++/56838 (GCC svn doesn't compile libreoffice 4.0.1.2)
authorJason Merrill <jason@redhat.com>
Mon, 8 Apr 2013 21:16:09 +0000 (17:16 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 8 Apr 2013 21:16:09 +0000 (17:16 -0400)
PR c++/56838
PR c++/17232
* typeck2.c (abstract_virtuals_error_sfinae): Disable
complete_type again.

From-SVN: r197613

gcc/cp/ChangeLog
gcc/cp/typeck2.c
gcc/testsuite/g++.dg/template/abstract-dr337.C

index 8b9bf350c0733fa435623f6686828505c43d4050..0604b55009291c3fa86019664138ea2f03086dc3 100644 (file)
@@ -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
index d9efafb851512976faf235d389c648f5c56e4a29..5c2b1b22611ea0cfa61e36cbc69000dcc8967982 100644 (file)
@@ -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
index 6905262d6cbfc43504aac42df3c7eeb40c1af729..4f66c1c118880e5c9ffec6511951e0f585e75b55 100644 (file)
@@ -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 *-*-* } }
 }