diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2002-06-26 20:07:02 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2002-06-26 20:07:02 +0000 |
commit | bd466c7bdea800a8147cd197528a09ab113efb0b (patch) | |
tree | 3063139512c8fbeefbb7eb47febcdb637b30c597 /gcc/java | |
parent | 88e5899c42f407b4a004f07547b66faedb337e5d (diff) | |
download | gcc-bd466c7bdea800a8147cd197528a09ab113efb0b.zip gcc-bd466c7bdea800a8147cd197528a09ab113efb0b.tar.gz gcc-bd466c7bdea800a8147cd197528a09ab113efb0b.tar.bz2 |
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
Diffstat (limited to 'gcc/java')
-rw-r--r-- | gcc/java/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/java/lex.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index e92ceff..e7a82e4 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -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. diff --git a/gcc/java/lex.c b/gcc/java/lex.c index 21c442b..3810096 100644 --- a/gcc/java/lex.c +++ b/gcc/java/lex.c @@ -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; } |