aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2011-04-07 17:47:31 -0400
committerJason Merrill <jason@gcc.gnu.org>2011-04-07 17:47:31 -0400
commit3cf0ca233fabc18547767ded4e4361bd632f6461 (patch)
treefeca1380847aef1a3dff2bc4c9389d96c59d59ca /gcc
parent362115a9125a17809f4b7c9c37afccc9029ed733 (diff)
downloadgcc-3cf0ca233fabc18547767ded4e4361bd632f6461.zip
gcc-3cf0ca233fabc18547767ded4e4361bd632f6461.tar.gz
gcc-3cf0ca233fabc18547767ded4e4361bd632f6461.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog3
-rw-r--r--gcc/cp/tree.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index b8b87cf..0d9251c 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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.
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index c2aa389..014986d 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)