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
4c8cc616
Commit
4c8cc616
authored
Feb 16, 1997
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(special_symbol, check_macro_name, collect_expansion): Don't treat "L"
in "L'...'" as identifier. From-SVN: r13660
parent
21f18241
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
gcc/cpplib.c
+9
-4
No files found.
gcc/cpplib.c
View file @
4c8cc616
/* CPP Library.
/* CPP Library.
Copyright (C) 1986, 87, 89, 92-6, 1997 Free Software Foundation, Inc.
Copyright (C) 1986, 87, 89, 92-6, 1997 Free Software Foundation, Inc.
Written
by Per Bothner, 1994-95.
Contributed
by Per Bothner, 1994-95.
Based on CCCP program by Paul Rubin, June 1986
Based on CCCP program by Paul Rubin, June 1986
Adapted to ANSI C, Richard Stallman, Jan 1987
Adapted to ANSI C, Richard Stallman, Jan 1987
...
@@ -1308,7 +1308,8 @@ collect_expansion (pfile, buf, limit, nargs, arglist)
...
@@ -1308,7 +1308,8 @@ collect_expansion (pfile, buf, limit, nargs, arglist)
Don't leave the # in the expansion. */
Don't leave the # in the expansion. */
exp_p
--
;
exp_p
--
;
SKIP_WHITE_SPACE
(
p
);
SKIP_WHITE_SPACE
(
p
);
if
(
p
==
limit
||
!
is_idstart
[
*
p
])
if
(
p
==
limit
||
!
is_idstart
[
*
p
]
||
(
*
p
==
'L'
&&
p
+
1
<
limit
&&
(
p
[
1
]
==
'\''
||
p
[
1
]
==
'"'
)))
cpp_error
(
pfile
,
cpp_error
(
pfile
,
"`#' operator is not followed by a macro argument name"
);
"`#' operator is not followed by a macro argument name"
);
else
else
...
@@ -1369,7 +1370,8 @@ collect_expansion (pfile, buf, limit, nargs, arglist)
...
@@ -1369,7 +1370,8 @@ collect_expansion (pfile, buf, limit, nargs, arglist)
while
(
p
!=
limit
&&
is_idchar
[
*
p
])
p
++
;
while
(
p
!=
limit
&&
is_idchar
[
*
p
])
p
++
;
id_len
=
p
-
id_beg
;
id_len
=
p
-
id_beg
;
if
(
is_idstart
[
c
])
{
if
(
is_idstart
[
c
]
&&
!
(
id_len
==
1
&&
c
==
'L'
&&
(
*
p
==
'\''
||
*
p
==
'"'
)))
{
register
struct
arglist
*
arg
;
register
struct
arglist
*
arg
;
for
(
arg
=
arglist
;
arg
!=
NULL
;
arg
=
arg
->
next
)
{
for
(
arg
=
arglist
;
arg
!=
NULL
;
arg
=
arg
->
next
)
{
...
@@ -1667,7 +1669,8 @@ check_macro_name (pfile, symname, usage)
...
@@ -1667,7 +1669,8 @@ check_macro_name (pfile, symname, usage)
for
(
p
=
symname
;
is_idchar
[
*
p
];
p
++
)
for
(
p
=
symname
;
is_idchar
[
*
p
];
p
++
)
;
;
sym_length
=
p
-
symname
;
sym_length
=
p
-
symname
;
if
(
sym_length
==
0
)
if
(
sym_length
==
0
||
(
sym_length
==
1
&&
*
symname
==
'L'
&&
(
*
p
==
'\''
||
*
p
==
'"'
)))
cpp_error
(
pfile
,
"invalid %s name"
,
usage
);
cpp_error
(
pfile
,
"invalid %s name"
,
usage
);
else
if
(
!
is_idstart
[
*
symname
])
{
else
if
(
!
is_idstart
[
*
symname
])
{
U_CHAR
*
msg
;
/* what pain... */
U_CHAR
*
msg
;
/* what pain... */
...
@@ -2417,6 +2420,8 @@ special_symbol (hp, pfile)
...
@@ -2417,6 +2420,8 @@ special_symbol (hp, pfile)
if
(
!
is_idstart
[
*
ip
->
cur
])
if
(
!
is_idstart
[
*
ip
->
cur
])
goto
oops
;
goto
oops
;
if
(
ip
->
cur
[
0
]
==
'L'
&&
(
ip
->
cur
[
1
]
==
'\''
||
ip
->
cur
[
1
]
==
'"'
))
goto
oops
;
if
(
hp
=
cpp_lookup
(
pfile
,
ip
->
cur
,
-
1
,
-
1
))
if
(
hp
=
cpp_lookup
(
pfile
,
ip
->
cur
,
-
1
,
-
1
))
{
{
#if 0
#if 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