From: DJ Delorie Date: Fri, 18 Dec 1998 11:50:30 +0000 (+0000) Subject: cvt.c (convert_to_reference): Check for both error_mark_node and NULL_NODE after... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=09ad2917045b93a3576f7adcf2e09ee9b17f9c6f;p=gcc.git cvt.c (convert_to_reference): Check for both error_mark_node and NULL_NODE after call to... * cvt.c (convert_to_reference): Check for both error_mark_node and NULL_NODE after call to convert_for_initialization. From-SVN: r24373 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 86901b8b63f..ca7bc01683d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +1998-12-18 DJ Delorie + + * cvt.c (convert_to_reference): Check for both error_mark_node + and NULL_NODE after call to convert_for_initialization. + 1998-12-17 Jason Merrill * error.c (interesting_scope_p): New fn. diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c index c8f9fcc57e9..b643ddc13a2 100644 --- a/gcc/cp/cvt.c +++ b/gcc/cp/cvt.c @@ -506,8 +506,8 @@ convert_to_reference (reftype, expr, convtype, flags, decl) { rval = convert_for_initialization (NULL_TREE, type, expr, flags, "converting", 0, 0); - if (rval == error_mark_node) - return error_mark_node; + if (rval == NULL_TREE || rval == error_mark_node) + return rval; rval = build_up_reference (reftype, rval, flags); if (rval && ! CP_TYPE_CONST_P (TREE_TYPE (reftype)))