From: Jason Merrill Date: Mon, 8 Apr 2013 21:16:09 +0000 (-0400) Subject: re PR c++/56838 (GCC svn doesn't compile libreoffice 4.0.1.2) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a0c06853a61384575e3af2415558363c33ffd808;p=gcc.git re PR c++/56838 (GCC svn doesn't compile libreoffice 4.0.1.2) PR c++/56838 PR c++/17232 * typeck2.c (abstract_virtuals_error_sfinae): Disable complete_type again. From-SVN: r197613 --- 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 + + PR c++/56838 + PR c++/17232 + * typeck2.c (abstract_virtuals_error_sfinae): Disable + complete_type again. + 2013-04-08 Paolo Carlini 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 -void g(T (*a)[1]) {} // { dg-error "abstract" "" } +void g(T (*a)[1]) {} // { dg-error "abstract" "" { xfail *-*-* } } int main() { - g >(0); // { dg-error "no matching function" } + g >(0); // { dg-error "no matching function" "" { xfail *-*-* } } }