aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/tree.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2012-12-06 23:54:27 -0500
committerJason Merrill <jason@gcc.gnu.org>2012-12-06 23:54:27 -0500
commit0ed4ab44f6f483b41ea21b0f85e1cc5e5acd5aac (patch)
tree7df55a2fce9ccc7d116fbbd096395ca780b36a92 /gcc/cp/tree.c
parentc7dd75fb5ce07474b0b9c72cf7ef1f19ee9f5ab6 (diff)
downloadgcc-0ed4ab44f6f483b41ea21b0f85e1cc5e5acd5aac.zip
gcc-0ed4ab44f6f483b41ea21b0f85e1cc5e5acd5aac.tar.gz
gcc-0ed4ab44f6f483b41ea21b0f85e1cc5e5acd5aac.tar.bz2
re PR c++/54325 (C++11 uniform initialization syntax for argument-less abstract base class constructor fails)
PR c++/54325 * tree.c (build_aggr_init_expr): Don't check for abstract class. From-SVN: r194284
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r--gcc/cp/tree.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 28ff0f2..ca82f75 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -407,18 +407,13 @@ build_aggr_init_array (tree return_type, tree fn, tree slot, int nargs,
callable. */
tree
-build_aggr_init_expr (tree type, tree init, tsubst_flags_t complain)
+build_aggr_init_expr (tree type, tree init, tsubst_flags_t /*complain*/)
{
tree fn;
tree slot;
tree rval;
int is_ctor;
- /* Make sure that we're not trying to create an instance of an
- abstract class. */
- if (abstract_virtuals_error_sfinae (NULL_TREE, type, complain))
- return error_mark_node;
-
if (TREE_CODE (init) == CALL_EXPR)
fn = CALL_EXPR_FN (init);
else if (TREE_CODE (init) == AGGR_INIT_EXPR)
@@ -477,6 +472,11 @@ build_cplus_new (tree type, tree init, tsubst_flags_t complain)
tree rval = build_aggr_init_expr (type, init, complain);
tree slot;
+ /* Make sure that we're not trying to create an instance of an
+ abstract class. */
+ if (abstract_virtuals_error_sfinae (NULL_TREE, type, complain))
+ return error_mark_node;
+
if (TREE_CODE (rval) == AGGR_INIT_EXPR)
slot = AGGR_INIT_EXPR_SLOT (rval);
else if (TREE_CODE (rval) == CALL_EXPR