diff options
author | Jason Merrill <jason@redhat.com> | 2013-03-16 22:37:09 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2013-03-16 22:37:09 -0400 |
commit | 57fcd4f4e4f12b1ede24f05385183d3f2dc7acfa (patch) | |
tree | c09183570e99438a8ee808eb03a342623d63c77f /gcc/cp/tree.c | |
parent | 2df663ccedf750ffe5ac481b3fe2aaff0d985a7f (diff) | |
download | gcc-57fcd4f4e4f12b1ede24f05385183d3f2dc7acfa.zip gcc-57fcd4f4e4f12b1ede24f05385183d3f2dc7acfa.tar.gz gcc-57fcd4f4e4f12b1ede24f05385183d3f2dc7acfa.tar.bz2 |
re PR c++/52748 ([C++11] N3276 changes to decltype)
N3276
PR c++/52748
* cp-tree.h (tsubst_flags): Add tf_decltype.
* call.c (build_cxx_call): Don't build a temporary if it's set.
(build_over_call): Make sure it's only passed to build_cxx_call.
* parser.c (cp_parser_primary_expression): Add decltype_p parm.
(cp_parser_unary_expression): Likewise.
(cp_parser_cast_expression): Likewise.
(cp_parser_binary_expression): Likewise.
(cp_parser_assignment_expression): Likewise.
(cp_parser_postfix_expression): Likewise. Pass tf_decltype.
(cp_parser_explicit_instantiation): Add decltype_p. Force a
temporary for a call on the LHS of a comma.
(cp_parser_decltype): Pass true to decltype_p parms.
* pt.c (tsubst) [DECLTYPE_TYPE]: Pass tf_decltype.
(tsubst_copy_and_build): Pass tf_decltype down only for
CALL_EXPR and the RHS of COMPOUND_EXPR.
* tree.c (build_cplus_new): Call complete_type_or_maybe_complain.
From-SVN: r196736
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r-- | gcc/cp/tree.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 1b484b1..6dc33b9 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -469,6 +469,9 @@ build_cplus_new (tree type, tree init, tsubst_flags_t complain) tree rval = build_aggr_init_expr (type, init); tree slot; + if (!complete_type_or_maybe_complain (type, init, complain)) + return error_mark_node; + /* Make sure that we're not trying to create an instance of an abstract class. */ if (abstract_virtuals_error_sfinae (NULL_TREE, type, complain)) |