diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2018-10-17 07:34:28 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2018-10-17 07:34:28 +0000 |
commit | cd1e244a1ced255fb0a5651bdab443fa254d9472 (patch) | |
tree | 912ff3a5b1e032298d1fef3797dab2f1c4b5a8ca | |
parent | 2be9999874fb71cd01519f096e5036a9959a603e (diff) | |
download | gcc-cd1e244a1ced255fb0a5651bdab443fa254d9472.zip gcc-cd1e244a1ced255fb0a5651bdab443fa254d9472.tar.gz gcc-cd1e244a1ced255fb0a5651bdab443fa254d9472.tar.bz2 |
2018-10-17 Paolo Carlini <paolo.carlini@oracle.com>
* Fix typo in ChangeLog.
From-SVN: r265234
-rw-r--r-- | gcc/cp/ChangeLog | 2 | ||||
-rw-r--r-- | gcc/cp/tree.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index f1541651..99595d9 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,7 +1,7 @@ 2018-10-17 Paolo Carlini <paolo.carlini@oracle.com> PR c++/84705 - * init.c (build_cplus_new): Avoid duplicate diagnostic about + * tree.c (build_cplus_new): Avoid duplicate diagnostic about incomplete type, early return error_mark_node if the second argument is error_mark_node. diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index e74b79c..251c344 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -646,6 +646,9 @@ build_cplus_new (tree type, tree init, tsubst_flags_t complain) tree rval = build_aggr_init_expr (type, init); tree slot; + if (init == error_mark_node) + return error_mark_node; + if (!complete_type_or_maybe_complain (type, init, complain)) return error_mark_node; |