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
25200ab2
Commit
25200ab2
authored
Feb 23, 2001
by
Mark Mitchell
Committed by
Mark Mitchell
Feb 23, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* spew.c (yylex): Correct handling of friends.
From-SVN: r39990
parent
515edc9b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
3 deletions
+23
-3
gcc/cp/ChangeLog
+4
-0
gcc/cp/spew.c
+7
-3
gcc/testsuite/g++.old-deja/g++.other/friend11.C
+12
-0
No files found.
gcc/cp/ChangeLog
View file @
25200ab2
2001-02-22 Mark Mitchell <mark@codesourcery.com>
* spew.c (yylex): Correct handling of friends.
2001-02-22 Mark Mitchell <mark@codesourcery.com>
* mangle.c (write_encoding): Pass write_function_type the
FUNCTION_DECL for the function being encoded.
(write_function_type): Pass it along to write_bare_function_type.
...
...
gcc/cp/spew.c
View file @
25200ab2
...
...
@@ -719,6 +719,8 @@ yylex ()
{
int
yychr
;
int
old_looking_for_typename
=
0
;
int
just_saw_new
=
0
;
int
just_saw_friend
=
0
;
timevar_push
(
TV_LEX
);
...
...
@@ -804,13 +806,13 @@ yylex ()
}
/* do_aggr needs to know if the previous token was `friend'. */
else
if
(
nth_token
(
0
)
->
yylval
.
ttype
==
ridpointers
[
RID_FRIEND
])
after
_friend
=
1
;
just_saw
_friend
=
1
;
break
;
case
NEW
:
/* do_aggr needs to know if the previous token was `new'. */
after
_new
=
1
;
just_saw
_new
=
1
;
break
;
case
TYPESPEC
:
...
...
@@ -824,7 +826,6 @@ yylex ()
case
AGGR
:
do_aggr
();
after_friend
=
after_new
=
0
;
break
;
case
ENUM
:
...
...
@@ -836,6 +837,9 @@ yylex ()
break
;
}
after_friend
=
just_saw_friend
;
after_new
=
just_saw_new
;
/* class member lookup only applies to the first token after the object
expression, except for explicit destructor calls. */
if
(
yychr
!=
'~'
)
...
...
gcc/testsuite/g++.old-deja/g++.other/friend11.C
0 → 100644
View file @
25200ab2
// Build don't link:
// Origin: robt@flyingpig.com
class
Outer
{
friend
void
f1
();
class
Inner2
;
};
class
Outer
::
Inner2
{
};
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