tree.c (build_aggr_init_expr): Always return error_mark_node on abstract violation.
authorJason Merrill <jason@redhat.com>
Thu, 7 Apr 2011 21:47:31 +0000 (17:47 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 7 Apr 2011 21:47:31 +0000 (17:47 -0400)
* tree.c (build_aggr_init_expr): Always return error_mark_node
on abstract violation.

From-SVN: r172144

gcc/cp/ChangeLog
gcc/cp/tree.c

index b8b87cf8e3d0d4773777ae0a7c470f6613eaf42b..0d9251ce6897d955ed8428b127f406cb795969fc 100644 (file)
@@ -1,5 +1,8 @@
 2011-04-07  Jason Merrill  <jason@redhat.com>
 
+       * tree.c (build_aggr_init_expr): Always return error_mark_node
+       on abstract violation.
+
        PR c++/48450
        * tree.c (build_cplus_new, build_aggr_init_expr): Take complain.
        (bot_manip): Adjust.
index c2aa389875a01dceba486376c4e140f825d2c3e2..014986dc3188d014d472b35e689c6b5981a2721a 100644 (file)
@@ -382,8 +382,7 @@ build_aggr_init_expr (tree type, tree init, tsubst_flags_t complain)
 
   /* Make sure that we're not trying to create an instance of an
      abstract class.  */
-  if (abstract_virtuals_error_sfinae (NULL_TREE, type, complain)
-      && !(complain & tf_error))
+  if (abstract_virtuals_error_sfinae (NULL_TREE, type, complain))
     return error_mark_node;
 
   if (TREE_CODE (init) == CALL_EXPR)