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
57e9b915
Commit
57e9b915
authored
Nov 10, 2001
by
Kaveh R. Ghazi
Committed by
Kaveh Ghazi
Nov 10, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* tradcif.y (parse_number): Use TOLOWER/ISXDIGIT/hex_value/hex_p.
From-SVN: r46913
parent
9e1ac915
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
14 deletions
+8
-14
gcc/ChangeLog
+1
-0
gcc/tradcif.y
+7
-14
No files found.
gcc/ChangeLog
View file @
57e9b915
...
...
@@ -3,6 +3,7 @@
*
cppexp
.
c
(
parse_number
)
:
Use
ISXDIGIT
/
hex_value
.
*
cpplex
.
c
(
hex_digit_value
)
:
Use
hex_p
/
hex_value
.
*
cppmain
.
c
(
general_init
)
:
Call
hex_init
.
*
tradcif
.
y
(
parse_number
)
:
Use
TOLOWER
/
ISXDIGIT
/
hex_value
/
hex_p
.
*
config
.
gcc
(
i
[
34567
]
86
-
dg
-
dgux
*
)
:
Don
'
t
set
`
out_file
'
.
...
...
gcc/tradcif.y
View file @
57e9b915
...
...
@@ -248,14 +248,11 @@ parse_number (olen)
c = *p++;
len--;
if (ISUPPER (c))
c += 'a' - 'A';
if (ISDIGIT (c)) {
n *= base;
n += c - '0';
} else if (base == 16 && c >= 'a' && c <= 'f') {
n *= base;
n += c - 'a' + 10;
c = TOLOWER (c);
if (ISDIGIT (c)
|| (base == 16 && ISXDIGIT (c))) {
n = (n * base) + hex_value (c);
} else {
/* `l' means long, and `u' means unsigned. */
while (1) {
...
...
@@ -509,12 +506,8 @@ parse_escape (string_ptr)
for (;;)
{
c = *(*string_ptr)++;
if (ISDIGIT (c))
i = (i << 4) + c - '0';
else if (c >= 'a' && c <= 'f')
i = (i << 4) + c - 'a' + 10;
else if (c >= 'A' && c <= 'F')
i = (i << 4) + c - 'A' + 10;
if (hex_p (c))
i = (i << 4) + hex_value (c);
else
{
(*string_ptr)--;
...
...
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