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
88a8aaac
Commit
88a8aaac
authored
Dec 21, 2010
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't warn about []int of string with NUL bytes.
From-SVN: r168146
parent
a8f3a62d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
gcc/go/gofrontend/lex.cc
+11
-10
No files found.
gcc/go/gofrontend/lex.cc
View file @
88a8aaac
...
...
@@ -742,12 +742,7 @@ int
Lex
::
fetch_char
(
const
char
*
p
,
unsigned
int
*
value
)
{
unsigned
char
c
=
*
p
;
if
(
c
==
0
)
{
*
value
=
0xfffd
;
return
0
;
}
else
if
(
c
<=
0x7f
)
if
(
c
<=
0x7f
)
{
*
value
=
c
;
return
1
;
...
...
@@ -812,13 +807,19 @@ Lex::advance_one_utf8_char(const char* p, unsigned int* value,
bool
*
issued_error
)
{
*
issued_error
=
false
;
if
(
*
p
==
'\0'
)
{
error_at
(
this
->
location
(),
"invalid NUL byte"
);
*
issued_error
=
true
;
*
value
=
0
;
return
p
+
1
;
}
int
adv
=
Lex
::
fetch_char
(
p
,
value
);
if
(
adv
==
0
)
{
if
(
*
p
==
'\0'
)
error_at
(
this
->
location
(),
"invalid NUL byte"
);
else
error_at
(
this
->
location
(),
"invalid UTF-8 encoding"
);
error_at
(
this
->
location
(),
"invalid UTF-8 encoding"
);
*
issued_error
=
true
;
return
p
+
1
;
}
...
...
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