re PR java/7950 (jc1 parses files ending in 0x0d incorrectly)

* lex.c (java_read_unicode_collapsing_terminators): Handle case
	where \r appears at EOF.  Fixes PR java/7950.

From-SVN: r57258
This commit is contained in:
Tom Tromey 2002-09-17 20:59:53 +00:00 committed by Tom Tromey
parent f1acdf8b0f
commit 6a0225133c
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2002-09-17 Tom Tromey <tromey@redhat.com>
* lex.c (java_read_unicode_collapsing_terminators): Handle case
where \r appears at EOF. Fixes PR java/7950.
2002-09-16 Geoffrey Keating <geoffk@apple.com>
* java-tree.h (union lang_tree_node): Add chain_next option.

View File

@ -599,7 +599,7 @@ java_read_unicode_collapsing_terminators (lex, unicode_escape_p)
return a single line terminator. */
int dummy;
c = java_read_unicode (lex, &dummy);
if (c != '\n')
if (c != '\n' && c != UEOF)
lex->unget_value = c;
/* In either case we must return a newline. */
c = '\n';