aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/java/ChangeLog4
-rw-r--r--gcc/java/lex.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index c610918..cbe6322 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,7 @@
+2001-01-25 Richard Earnshaw <rearnsha@arm.com>
+
+ * lex.c (java_read_char): Check for EOF from getc first.
+
2001-01-23 Alexandre Petit-Bianco <apbianco@cygnus.com>
* class.c (layout_class): Don't lay the superclass out if it's
diff --git a/gcc/java/lex.c b/gcc/java/lex.c
index 32c104e..fdfb0a7 100644
--- a/gcc/java/lex.c
+++ b/gcc/java/lex.c
@@ -447,10 +447,10 @@ java_read_char (lex)
int c, c1, c2;
c = getc (lex->finput);
- if (c < 128)
- return (unicode_t)c;
if (c == EOF)
return UEOF;
+ if (c < 128)
+ return (unicode_t)c;
else
{
if ((c & 0xe0) == 0xc0)