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
8fa4bd81
Commit
8fa4bd81
authored
Feb 15, 2018
by
Jason Merrill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* libcpp/macro.c: Fix typos.
From-SVN: r257682
parent
10789329
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
libcpp/macro.c
+9
-9
No files found.
libcpp/macro.c
View file @
8fa4bd81
...
@@ -51,7 +51,7 @@ struct macro_arg
...
@@ -51,7 +51,7 @@ struct macro_arg
enum
macro_arg_token_kind
{
enum
macro_arg_token_kind
{
MACRO_ARG_TOKEN_NORMAL
,
MACRO_ARG_TOKEN_NORMAL
,
/* This is a macro argument token that got transformed into a string
/* This is a macro argument token that got transformed into a string
lit
t
eral, e.g. #foo. */
literal, e.g. #foo. */
MACRO_ARG_TOKEN_STRINGIFIED
,
MACRO_ARG_TOKEN_STRINGIFIED
,
/* This is a token resulting from the expansion of a macro
/* This is a token resulting from the expansion of a macro
argument that was itself a macro. */
argument that was itself a macro. */
...
@@ -1819,9 +1819,9 @@ replace_args (cpp_reader *pfile, cpp_hashnode *node, cpp_macro *macro,
...
@@ -1819,9 +1819,9 @@ replace_args (cpp_reader *pfile, cpp_hashnode *node, cpp_macro *macro,
multiple tokens. This is to save memory at the expense of
multiple tokens. This is to save memory at the expense of
accuracy.
accuracy.
Suppose we have #define SQARE(A) A * A
Suppose we have #define SQ
U
ARE(A) A * A
And then we do SQARE(2+3)
And then we do SQ
U
ARE(2+3)
Then the tokens 2, +, 3, will have the same location,
Then the tokens 2, +, 3, will have the same location,
saying they come from the expansion of the argument A. */
saying they come from the expansion of the argument A. */
...
@@ -1962,9 +1962,9 @@ replace_args (cpp_reader *pfile, cpp_hashnode *node, cpp_macro *macro,
...
@@ -1962,9 +1962,9 @@ replace_args (cpp_reader *pfile, cpp_hashnode *node, cpp_macro *macro,
save extra memory while tracking macro expansion
save extra memory while tracking macro expansion
locations. So in that case here is what we do:
locations. So in that case here is what we do:
Suppose we have #define SQARE(A) A * A
Suppose we have #define SQ
U
ARE(A) A * A
And then we do SQARE(2+3)
And then we do SQ
U
ARE(2+3)
Then the tokens 2, +, 3, will have the same location,
Then the tokens 2, +, 3, will have the same location,
saying they come from the expansion of the argument
saying they come from the expansion of the argument
...
@@ -1972,9 +1972,9 @@ replace_args (cpp_reader *pfile, cpp_hashnode *node, cpp_macro *macro,
...
@@ -1972,9 +1972,9 @@ replace_args (cpp_reader *pfile, cpp_hashnode *node, cpp_macro *macro,
So that means we are going to ignore the COUNT tokens
So that means we are going to ignore the COUNT tokens
resulting from the expansion of the current macro
resulting from the expansion of the current macro
ar
ug
ment. In other words all the ARG_TOKENS_COUNT tokens
ar
gu
ment. In other words all the ARG_TOKENS_COUNT tokens
resulting from the expansion of the macro argument will
resulting from the expansion of the macro argument will
have the index I.
Normally, each of those token
should
have the index I.
Normally, each of those tokens
should
have index I+J. */
have index I+J. */
unsigned
token_index
=
i
;
unsigned
token_index
=
i
;
unsigned
index
;
unsigned
index
;
...
@@ -1992,8 +1992,8 @@ replace_args (cpp_reader *pfile, cpp_hashnode *node, cpp_macro *macro,
...
@@ -1992,8 +1992,8 @@ replace_args (cpp_reader *pfile, cpp_hashnode *node, cpp_macro *macro,
/* With a non-empty argument on the LHS of ##, the last
/* With a non-empty argument on the LHS of ##, the last
token should be flagged PASTE_LEFT. */
token should be flagged PASTE_LEFT. */
if
(
src
->
flags
&
PASTE_LEFT
)
if
(
src
->
flags
&
PASTE_LEFT
)
paste_flag
=
paste_flag
(
const
cpp_token
**
)
tokens_buff_last_token_ptr
(
buff
);
=
(
const
cpp_token
**
)
tokens_buff_last_token_ptr
(
buff
);
}
}
else
if
(
CPP_PEDANTIC
(
pfile
)
&&
!
CPP_OPTION
(
pfile
,
c99
)
else
if
(
CPP_PEDANTIC
(
pfile
)
&&
!
CPP_OPTION
(
pfile
,
c99
)
&&
!
macro
->
syshdr
&&
!
cpp_in_system_header
(
pfile
))
&&
!
macro
->
syshdr
&&
!
cpp_in_system_header
(
pfile
))
...
...
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