Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
4aed8938
Commit
4aed8938
authored
Mar 21, 2001
by
Tom Tromey
Committed by
Tom Tromey
Mar 21, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* lex.c (java_read_unicode): Only accept leading `u's.
From-SVN: r40702
parent
7e0c895f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
gcc/java/ChangeLog
+4
-0
gcc/java/lex.c
+10
-5
No files found.
gcc/java/ChangeLog
View file @
4aed8938
2001-03-20 Tom Tromey <tromey@redhat.com>
* lex.c (java_read_unicode): Only accept leading `u's.
2001-03-20 Tom Tromey <tromey@redhat.com>
* jcf-parse.c (read_class): Initialize `class'.
2001-03-20 Matt Kraai <kraai@alumni.carnegiemellon.edu>
...
...
gcc/java/lex.c
View file @
4aed8938
...
...
@@ -532,6 +532,16 @@ java_read_unicode (lex, unicode_escape_p)
{
unicode_t
unicode
=
0
;
int
shift
=
12
;
/* Recognize any number of `u's in \u. */
while
((
c
=
java_read_char
(
lex
))
==
'u'
)
;
/* Unget the most recent character as it is not a `u'. */
if
(
c
==
UEOF
)
return
UEOF
;
lex
->
unget_value
=
c
;
/* Next should be 4 hex digits, otherwise it's an error.
The hex value is converted into the unicode, pushed into
the Unicode stream. */
...
...
@@ -543,11 +553,6 @@ java_read_unicode (lex, unicode_escape_p)
unicode
|=
(
unicode_t
)((
c
-
'0'
)
<<
shift
);
else
if
((
c
>=
'a'
&&
c
<=
'f'
)
||
(
c
>=
'A'
&&
c
<=
'F'
))
unicode
|=
(
unicode_t
)((
10
+
(
c
|
0x20
)
-
'a'
)
<<
shift
);
else
if
(
c
==
'u'
)
{
/* Recognize any number of u in \u. */
shift
+=
4
;
}
else
java_lex_error
(
"Non hex digit in Unicode escape sequence"
,
0
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment