lex.c (java_read_char): Avoid "comparison is always true" warning.

* lex.c (java_read_char): Avoid "comparison is always true"
	warning.

From-SVN: r55014
This commit is contained in:
Kaveh R. Ghazi 2002-06-26 20:07:02 +00:00 committed by Kaveh Ghazi
parent 88e5899c42
commit bd466c7bde
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2002-06-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* lex.c (java_read_char): Avoid "comparison is always true"
warning.
2002-06-25 Andreas Schwab <schwab@suse.de>
* expr.c (JSR): Avoid undefined operation on PC.

View File

@ -494,8 +494,8 @@ java_read_char (lex)
+ (c2 & 0x3f));
/* Check for valid 3-byte characters.
Don't allow surrogate, \ufffe or \uffff. */
if (r >= 0x800 && r <= 0xffff
&& ! (r >= 0xd800 && r <= 0xdfff)
if (IN_RANGE (r, 0x800, 0xffff)
&& ! IN_RANGE (r, 0xd800, 0xdfff)
&& r != 0xfffe && r != 0xffff)
return r;
}