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
798eed5e
Commit
798eed5e
authored
Feb 14, 1998
by
Jason Merrill
Committed by
Jason Merrill
Feb 14, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* call.c (standard_conversion): Fix multi-level ptr conversions.
From-SVN: r17999
parent
d757d141
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
26 deletions
+16
-26
gcc/cp/ChangeLog
+2
-2
gcc/cp/call.c
+9
-13
gcc/cp/pt.c
+5
-11
No files found.
gcc/cp/ChangeLog
View file @
798eed5e
Fri Feb 13 14:
30:35
1998 Jason Merrill <jason@yorick.cygnus.com>
Fri Feb 13 14:
55:37
1998 Jason Merrill <jason@yorick.cygnus.com>
*
pt.c (determine_specialization): Give better error
s.
*
call.c (standard_conversion): Fix multi-level ptr conversion
s.
Fri Feb 13 14:06:22 1998 Mike Stump <mrs@wrs.com>
...
...
gcc/cp/call.c
View file @
798eed5e
...
...
@@ -3107,19 +3107,15 @@ standard_conversion (to, from, expr)
{
enum
tree_code
ufcode
=
TREE_CODE
(
TREE_TYPE
(
from
));
enum
tree_code
utcode
=
TREE_CODE
(
TREE_TYPE
(
to
));
tree
nconv
=
NULL_TREE
;
if
(
comptypes
(
TYPE_MAIN_VARIANT
(
TREE_TYPE
(
from
)),
TYPE_MAIN_VARIANT
(
TREE_TYPE
(
to
)),
1
))
nconv
=
conv
;
else
if
(
utcode
==
VOID_TYPE
&&
ufcode
!=
OFFSET_TYPE
&&
ufcode
!=
FUNCTION_TYPE
)
if
(
utcode
==
VOID_TYPE
&&
ufcode
!=
OFFSET_TYPE
&&
ufcode
!=
FUNCTION_TYPE
)
{
from
=
build_pointer_type
(
cp_build_type_variant
(
void_type_node
,
TYPE_READONLY
(
TREE_TYPE
(
from
)),
TYPE_VOLATILE
(
TREE_TYPE
(
from
))));
n
conv
=
build_conv
(
PTR_CONV
,
from
,
conv
);
conv
=
build_conv
(
PTR_CONV
,
from
,
conv
);
}
else
if
(
ufcode
==
OFFSET_TYPE
&&
utcode
==
OFFSET_TYPE
)
{
...
...
@@ -3133,7 +3129,7 @@ standard_conversion (to, from, expr)
{
from
=
build_offset_type
(
tbase
,
TREE_TYPE
(
TREE_TYPE
(
from
)));
from
=
build_pointer_type
(
from
);
n
conv
=
build_conv
(
PMEM_CONV
,
from
,
conv
);
conv
=
build_conv
(
PMEM_CONV
,
from
,
conv
);
}
}
else
if
(
IS_AGGR_TYPE
(
TREE_TYPE
(
from
))
...
...
@@ -3145,14 +3141,14 @@ standard_conversion (to, from, expr)
TYPE_READONLY
(
TREE_TYPE
(
from
)),
TYPE_VOLATILE
(
TREE_TYPE
(
from
)));
from
=
build_pointer_type
(
from
);
n
conv
=
build_conv
(
PTR_CONV
,
from
,
conv
);
conv
=
build_conv
(
PTR_CONV
,
from
,
conv
);
}
}
if
(
nconv
&&
comptypes
(
from
,
to
,
1
))
conv
=
nconv
;
else
if
(
nconv
&&
comp_ptr_ttypes
(
TREE_TYPE
(
to
),
TREE_TYPE
(
from
)))
conv
=
build_conv
(
QUAL_CONV
,
to
,
n
conv
);
if
(
comptypes
(
from
,
to
,
1
))
/* OK */
;
else
if
(
comp_ptr_ttypes
(
TREE_TYPE
(
to
),
TREE_TYPE
(
from
)))
conv
=
build_conv
(
QUAL_CONV
,
to
,
conv
);
else
if
(
ptr_reasonably_similar
(
TREE_TYPE
(
to
),
TREE_TYPE
(
from
)))
{
conv
=
build_conv
(
PTR_CONV
,
to
,
conv
);
...
...
gcc/cp/pt.c
View file @
798eed5e
...
...
@@ -519,15 +519,7 @@ determine_specialization (template_id, decl, targs_out,
tmpl
=
DECL_TI_TEMPLATE
(
fn
);
else
if
(
TREE_CODE
(
fn
)
!=
TEMPLATE_DECL
||
(
need_member_template
&&
!
is_member_template
(
fn
)))
{
if
(
decls_match
(
decl
,
fn
)
&&
0
)
{
cp_error
(
"`template <>' applied to non-specialization `%D'"
,
fn
);
return
NULL_TREE
;
}
continue
;
}
continue
;
else
tmpl
=
fn
;
...
...
@@ -572,7 +564,8 @@ determine_specialization (template_id, decl, targs_out,
{
no_match
:
if
(
complain
)
cp_error
(
"`%D' does not match any template declaration"
,
decl
);
cp_error
(
"`%D' does not match any template declaration"
,
template_id
);
return
NULL_TREE
;
}
...
...
@@ -581,7 +574,8 @@ determine_specialization (template_id, decl, targs_out,
ambiguous
:
if
(
complain
)
{
cp_error
(
"ambiguous template specialization `%D'"
,
decl
);
cp_error
(
"ambiguous template specialization `%D'"
,
template_id
);
print_candidates
(
templates
);
}
return
NULL_TREE
;
...
...
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