cvt.c (convert_to_reference): Check for both error_mark_node and NULL_NODE after...
authorDJ Delorie <dj@cygnus.com>
Fri, 18 Dec 1998 11:50:30 +0000 (11:50 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Fri, 18 Dec 1998 11:50:30 +0000 (06:50 -0500)
* cvt.c (convert_to_reference): Check for both error_mark_node
and NULL_NODE after call to convert_for_initialization.

From-SVN: r24373

gcc/cp/ChangeLog
gcc/cp/cvt.c

index 86901b8b63fd325d3b2fe2be1c987e651257730b..ca7bc01683dc48abeaf40a83621b45a6173399cc 100644 (file)
@@ -1,3 +1,8 @@
+1998-12-18  DJ Delorie  <dj@cygnus.com>
+
+       * 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  <jason@yorick.cygnus.com>
 
        * error.c (interesting_scope_p): New fn.
index c8f9fcc57e9b7bc30b6e76f0d4e7ce8b7afd1966..b643ddc13a22997589a4eecb86d1a8a01b292d72 100644 (file)
@@ -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)))