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
f62dbf03
Commit
f62dbf03
authored
Aug 19, 1997
by
Jason Merrill
Committed by
Jason Merrill
Aug 19, 1997
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge
From-SVN: r14853
parent
da20811c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
82 additions
and
12 deletions
+82
-12
gcc/cp/ChangeLog
+13
-0
gcc/cp/call.c
+33
-1
gcc/cp/decl2.c
+19
-0
gcc/cp/parse.y
+11
-10
gcc/cp/pt.c
+5
-0
gcc/cp/repo.c
+1
-1
No files found.
gcc/cp/ChangeLog
View file @
f62dbf03
Tue Aug 19 02:26:07 1997 Jason Merrill <jason@yorick.cygnus.com>
* call.c (is_subseq): New fn.
(compare_ics): Use it.
* repo.c (finish_repo): Don't crash on no args.
* parse.y (named_complex_class_head_sans_basetype): Handle
explicit global scope.
* decl2.c (handle_class_head): New fn.
* pt.c (unify): Add CONST_DECL case.
Thu Aug 14 10:05:13 1997 Brendan Kehoe <brendan@lisa.cygnus.com>
* rtti.c (permanent_obstack): Fix decl to not be a pointer.
...
...
gcc/cp/call.c
View file @
f62dbf03
...
...
@@ -5452,6 +5452,31 @@ compare_qual (ics1, ics2)
return
0
;
}
/* Determine whether standard conversion sequence ICS1 is a proper
subsequence of ICS2. We assume that a conversion of the same code
between the same types indicates a subsequence. */
static
int
is_subseq
(
ics1
,
ics2
)
tree
ics1
,
ics2
;
{
for
(;;)
{
ics2
=
TREE_OPERAND
(
ics2
,
0
));
if
(
TREE_CODE
(
ics2
)
==
TREE_CODE
(
ics1
)
&&
comptypes
(
TREE_TYPE
(
ics2
),
TREE_TYPE
(
ics1
),
1
)
&&
comptypes
(
TREE_TYPE
(
TREE_OPERAND
(
ics2
,
0
)),
TREE_TYPE
(
TREE_OPERAND
(
ics1
,
0
)),
1
))
return
1
;
if
(
TREE_CODE
(
ics2
)
==
USER_CONV
||
TREE_CODE
(
ics2
)
==
AMBIG_CONV
||
TREE_CODE
(
ics2
)
==
IDENTITY_CONV
)
return
0
;
}
}
/* Compare two implicit conversion sequences according to the rules set out in
[over.ics.rank]. Return values:
...
...
@@ -5549,7 +5574,14 @@ compare_ics (ics1, ics2)
#endif
if
(
TREE_CODE
(
main1
)
!=
TREE_CODE
(
main2
))
return
0
;
{
/* ...if S1 is a proper subsequence of S2 */
if
(
is_subseq
(
main1
,
main2
))
return
1
;
if
(
is_subseq
(
main2
,
main1
))
return
-
1
;
return
0
;
}
if
(
TREE_CODE
(
main1
)
==
PTR_CONV
||
TREE_CODE
(
main1
)
==
PMEM_CONV
||
TREE_CODE
(
main1
)
==
REF_BIND
||
TREE_CODE
(
main1
)
==
BASE_CONV
)
...
...
gcc/cp/decl2.c
View file @
f62dbf03
...
...
@@ -3710,3 +3710,22 @@ mark_used (decl)
if
(
DECL_LANG_SPECIFIC
(
decl
)
&&
DECL_TEMPLATE_INFO
(
decl
))
instantiate_decl
(
decl
);
}
/* Helper function for named_class_head_sans_basetype nonterminal. */
tree
handle_class_head
(
aggr
,
scope
,
id
)
tree
aggr
,
scope
,
id
;
{
if
(
TREE_CODE
(
id
)
==
TYPE_DECL
)
return
id
;
if
(
scope
)
cp_error
(
"`%T' does not have a nested type named `%D'"
,
scope
,
id
);
else
cp_error
(
"no file-scope type named `%D'"
,
id
);
id
=
xref_tag
(
aggr
,
make_anon_name
(),
NULL_TREE
,
1
);
return
TYPE_MAIN_DECL
(
id
);
}
gcc/cp/parse.y
View file @
f62dbf03
...
...
@@ -2280,16 +2280,17 @@ named_complex_class_head_sans_basetype:
aggr nested_name_specifier identifier
{
current_aggr = $1;
if (TREE_CODE ($3) == TYPE_DECL)
$$ = $3;
else
{
cp_error ("`%T' does not have a nested type named `%D'",
$2, $3);
$$ = xref_tag
(current_aggr, make_anon_name (), NULL_TREE, 1);
$$ = TYPE_MAIN_DECL ($$);
}
$$ = handle_class_head ($1, $2, $3);
}
| aggr global_scope nested_name_specifier identifier
{
current_aggr = $1;
$$ = handle_class_head ($1, $3, $4);
}
| aggr global_scope identifier
{
current_aggr = $1;
$$ = handle_class_head ($1, NULL_TREE, $3);
}
| aggr template_type
{ current_aggr = $$; $$ = $2; }
...
...
gcc/cp/pt.c
View file @
f62dbf03
...
...
@@ -2945,6 +2945,11 @@ unify (tparms, targs, ntparms, parm, arg, nsubsts, strict)
return
unify
(
tparms
,
targs
,
ntparms
,
TREE_TYPE
(
parm
),
TREE_TYPE
(
arg
),
nsubsts
,
strict
);
case
CONST_DECL
:
if
(
arg
!=
decl_constant_value
(
parm
))
return
1
;
return
0
;
default
:
sorry
(
"use of `%s' in template type unification"
,
tree_code_name
[(
int
)
TREE_CODE
(
parm
)]);
...
...
gcc/cp/repo.c
View file @
f62dbf03
...
...
@@ -420,7 +420,7 @@ finish_repo ()
if
(
strcmp
(
old_main
,
main_input_filename
)
!=
0
||
strcmp
(
old_dir
,
dir
)
!=
0
||
(
args
==
NULL
)
!=
(
old_args
==
NULL
)
||
strcmp
(
old_args
,
args
)
!=
0
)
||
(
args
&&
strcmp
(
old_args
,
args
)
!=
0
)
)
repo_changed
=
1
;
if
(
!
repo_changed
||
errorcount
||
sorrycount
)
...
...
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