c-typeck.c (parser_build_binary_op): If result from build_binary_op is ERROR_MARK...
authorHans-Peter Nilsson <hp@axis.com>
Tue, 22 Jan 2002 07:48:25 +0000 (07:48 +0000)
committerHans-Peter Nilsson <hp@gcc.gnu.org>
Tue, 22 Jan 2002 07:48:25 +0000 (07:48 +0000)
* c-typeck.c (parser_build_binary_op): If result from
build_binary_op is ERROR_MARK just return error_mark_node without
further processing.

From-SVN: r49066

gcc/ChangeLog
gcc/c-typeck.c

index 37c60bd81ca7123bb093548216a85defaf643319..d026309ec5dff3f1cb6905dc9a7e06bb95c33fd9 100644 (file)
@@ -1,3 +1,9 @@
+2002-01-22  Hans-Peter Nilsson  <hp@axis.com>
+
+       * c-typeck.c (parser_build_binary_op): If result from
+       build_binary_op is ERROR_MARK just return error_mark_node without
+       further processing.
+
 2002-01-21  Jason Thorpe  <thorpej@wasabisystems.com>
 
        * config/netbsd.h (TARGET_HAS_F_SETLKW): define.
index 756832d44022cc3801a2530696fdff0a9296cafb..a1a00fcefe1022514b71b74bc90c99b4786f4a02 100644 (file)
@@ -1799,6 +1799,9 @@ parser_build_binary_op (code, arg1, arg2)
   enum tree_code code1 = ERROR_MARK;
   enum tree_code code2 = ERROR_MARK;
 
+  if (TREE_CODE (result) == ERROR_MARK)
+    return error_mark_node;
+
   if (IS_EXPR_CODE_CLASS (class1))
     code1 = C_EXP_ORIGINAL_CODE (arg1);
   if (IS_EXPR_CODE_CLASS (class2))