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
a0469a32
Commit
a0469a32
authored
Jul 10, 1995
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(rescan): Don't address outside of array when preprocessing C++
comments. From-SVN: r10118
parent
d679bebf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
28 deletions
+19
-28
gcc/cccp.c
+19
-28
No files found.
gcc/cccp.c
View file @
a0469a32
...
...
@@ -2991,38 +2991,29 @@ do { ip = &instack[indepth]; \
/* C++ style comment... */
start_line
=
ip
->
lineno
;
--
ibp
;
/* Back over the slash */
--
obp
;
/* Comments are equivalent to spaces. */
if
(
!
put_out_comments
)
*
obp
++
=
' '
;
else
{
/* must fake up a comment here */
*
obp
++
=
'/'
;
*
obp
++
=
'/'
;
}
{
U_CHAR
*
before_bp
=
ibp
+
2
;
obp
[
-
1
]
=
' '
;
while
(
ibp
<
limit
)
{
if
(
ibp
[
-
1
]
!=
'\\'
&&
*
ibp
==
'\n'
)
{
if
(
put_out_comments
)
{
bcopy
((
char
*
)
before_bp
,
(
char
*
)
obp
,
ibp
-
before_bp
);
obp
+=
ibp
-
before_bp
;
}
break
;
}
else
{
if
(
*
ibp
==
'\n'
)
{
++
ip
->
lineno
;
/* Copy the newline into the output buffer, in order to
avoid the pain of a #line every time a multiline comment
is seen. */
if
(
!
put_out_comments
)
*
obp
++
=
'\n'
;
++
op
->
lineno
;
{
U_CHAR
*
before_bp
=
ibp
;
while
(
++
ibp
<
limit
)
{
if
(
*
ibp
==
'\n'
)
{
if
(
ibp
[
-
1
]
!=
'\\'
)
{
if
(
put_out_comments
)
{
bcopy
((
char
*
)
before_bp
,
(
char
*
)
obp
,
ibp
-
before_bp
);
obp
+=
ibp
-
before_bp
;
}
break
;
}
ibp
++
;
++
ip
->
lineno
;
/* Copy the newline into the output buffer, in order to
avoid the pain of a #line every time a multiline comment
is seen. */
if
(
!
put_out_comments
)
*
obp
++
=
'\n'
;
++
op
->
lineno
;
}
}
break
;
...
...
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