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
f84cddb9
Commit
f84cddb9
authored
Oct 09, 1996
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(yylex): Treat `$' just like `_', except issue a diagnostic if
!dollars_in_ident or if pedantic. From-SVN: r12927
parent
d348bc34
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
gcc/c-lex.c
+9
-8
No files found.
gcc/c-lex.c
View file @
f84cddb9
...
@@ -986,11 +986,6 @@ yylex ()
...
@@ -986,11 +986,6 @@ yylex ()
value
=
ENDFILE
;
value
=
ENDFILE
;
break
;
break
;
case
'$'
:
if
(
dollars_in_ident
)
goto
letter
;
return
'$'
;
case
'L'
:
case
'L'
:
/* Capital L may start a wide-string or wide-character constant. */
/* Capital L may start a wide-string or wide-character constant. */
{
{
...
@@ -1041,6 +1036,7 @@ yylex ()
...
@@ -1041,6 +1036,7 @@ yylex ()
case
'u'
:
case
'v'
:
case
'w'
:
case
'x'
:
case
'y'
:
case
'u'
:
case
'v'
:
case
'w'
:
case
'x'
:
case
'y'
:
case
'z'
:
case
'z'
:
case
'_'
:
case
'_'
:
case
'$'
:
letter
:
letter
:
p
=
token_buffer
;
p
=
token_buffer
;
while
(
isalnum
(
c
)
||
c
==
'_'
||
c
==
'$'
||
c
==
'@'
)
while
(
isalnum
(
c
)
||
c
==
'_'
||
c
==
'$'
||
c
==
'@'
)
...
@@ -1048,8 +1044,13 @@ yylex ()
...
@@ -1048,8 +1044,13 @@ yylex ()
/* Make sure this char really belongs in an identifier. */
/* Make sure this char really belongs in an identifier. */
if
(
c
==
'@'
&&
!
doing_objc_thang
)
if
(
c
==
'@'
&&
!
doing_objc_thang
)
break
;
break
;
if
(
c
==
'$'
&&
!
dollars_in_ident
)
if
(
c
==
'$'
)
break
;
{
if
(
!
dollars_in_ident
)
error
(
"`$' in identifier"
);
else
if
(
pedantic
)
pedwarn
(
"`$' in identifier"
);
}
if
(
p
>=
token_buffer
+
maxtoken
)
if
(
p
>=
token_buffer
+
maxtoken
)
p
=
extend_token_buffer
(
p
);
p
=
extend_token_buffer
(
p
);
...
@@ -1658,7 +1659,7 @@ yylex ()
...
@@ -1658,7 +1659,7 @@ yylex ()
ungetc
(
c
,
finput
);
ungetc
(
c
,
finput
);
*
p
=
0
;
*
p
=
0
;
if
(
isalnum
(
c
)
||
c
==
'.'
||
c
==
'_'
if
(
isalnum
(
c
)
||
c
==
'.'
||
c
==
'_'
||
c
==
'$'
||
(
!
flag_traditional
&&
(
c
==
'-'
||
c
==
'+'
)
||
(
!
flag_traditional
&&
(
c
==
'-'
||
c
==
'+'
)
&&
(
p
[
-
1
]
==
'e'
||
p
[
-
1
]
==
'E'
)))
&&
(
p
[
-
1
]
==
'e'
||
p
[
-
1
]
==
'E'
)))
error
(
"missing white space after number `%s'"
,
token_buffer
);
error
(
"missing white space after number `%s'"
,
token_buffer
);
...
...
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