This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix finish_for_loop (java/parse.y)



Compiling gcc for i686-linux-gnu I got this warning:
/cvs/gcc/gcc/java/parse.y:15006: warning: suggest parentheses around comparison in operand of |

But I think the "|" is wrong here.

Ok to commit the appended patch?  I've bootstrapped, regtested on
i686-linux-gnu.

Andreas

2002-05-07  Andreas Jaeger  <aj@suse.de>

	* parse.y (finish_for_loop): Fix if statement.


      if (! IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (TREE_CODE (up2)))
	  | TREE_CODE (up2) == LOOP_EXPR)
	abort ();

============================================================
Index: gcc/java/parse.y
--- java/parse.y	7 May 2002 03:32:01 -0000	1.376
+++ java/parse.y	7 May 2002 15:18:08 -0000
@@ -15003,7 +15003,7 @@ finish_for_loop (location, condition, up
       /* Try to detect constraint violations.  These would be
 	 programming errors somewhere.  */
       if (! IS_EXPR_CODE_CLASS (TREE_CODE_CLASS (TREE_CODE (up2)))
-	  | TREE_CODE (up2) == LOOP_EXPR)
+	  || TREE_CODE (up2) == LOOP_EXPR)
 	abort ();
       SUPPRESS_UNREACHABLE_ERROR (up2) = 1;
     }

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]