From: Jason Merrill Date: Thu, 7 Apr 2011 21:47:31 +0000 (-0400) Subject: tree.c (build_aggr_init_expr): Always return error_mark_node on abstract violation. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3cf0ca233fabc18547767ded4e4361bd632f6461;p=gcc.git tree.c (build_aggr_init_expr): Always return error_mark_node on abstract violation. * tree.c (build_aggr_init_expr): Always return error_mark_node on abstract violation. From-SVN: r172144 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index b8b87cf8e3d..0d9251ce689 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2011-04-07 Jason Merrill + * 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. diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index c2aa389875a..014986dc318 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -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)