diff options
author | Mike Stump <mrs@wrs.com> | 1998-02-13 14:07:32 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1998-02-13 09:07:32 -0500 |
commit | 8017079182d9bc07dca83a8d10f1e52ee8c245ec (patch) | |
tree | 3a4a19be18e26465cc27c734bcd4a11d0602642c /gcc | |
parent | 440a6c2a4e6974e1069fd17cdf88d03eeee861eb (diff) | |
download | gcc-8017079182d9bc07dca83a8d10f1e52ee8c245ec.zip gcc-8017079182d9bc07dca83a8d10f1e52ee8c245ec.tar.gz gcc-8017079182d9bc07dca83a8d10f1e52ee8c245ec.tar.bz2 |
* init.c (build_new): Propagate error_mark_node up.
From-SVN: r17968
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/init.c | 12 |
2 files changed, 9 insertions, 7 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index bdad01d..3dfba2e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com> + + * init.c (build_new): Propagate error_mark_node up. + Fri Feb 13 13:24:32 1998 Jason Merrill <jason@yorick.cygnus.com> * parse.y (simple_stmt): If the condition isn't a declaration, diff --git a/gcc/cp/init.c b/gcc/cp/init.c index c3bb1a8..ced15d4 100644 --- a/gcc/cp/init.c +++ b/gcc/cp/init.c @@ -2666,13 +2666,11 @@ build_new_1 (exp) newrval = build_method_call (newrval, ctor_identifier, init, TYPE_BINFO (true_type), flags); - if (newrval) - { - rval = newrval; - TREE_HAS_CONSTRUCTOR (rval) = 1; - } - else - rval = error_mark_node; + if (newrval == NULL_TREE || newrval == error_mark_node) + return error_mark_node; + + rval = newrval; + TREE_HAS_CONSTRUCTOR (rval) = 1; } else rval = build (VEC_INIT_EXPR, TREE_TYPE (rval), |