diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-03-19 21:37:25 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-03-19 21:37:25 +0000 |
commit | a8352d21a97b18ace689f5a2fef5b02a847f17ed (patch) | |
tree | 0be99e31dd5e1138ae324f0e82d6c3f2a689cb50 /gcc | |
parent | 140312ca1a291a24463ee070b0bf4e92ab6ec07d (diff) | |
download | gcc-a8352d21a97b18ace689f5a2fef5b02a847f17ed.tar.gz |
* call.c (standard_conversion): Handle A* -> const A* properly.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@18718 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 2 | ||||
-rw-r--r-- | gcc/cp/call.c | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index a586432024c..b70bef15c74 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,7 @@ Thu Mar 19 11:51:58 1998 Jason Merrill <jason@yorick.cygnus.com> + * call.c (standard_conversion): Handle A* -> const A* properly. + * pt.c (get_bindings_real): Rename from get_bindings. Add check_rettype parm. (get_bindings): Pass 1. diff --git a/gcc/cp/call.c b/gcc/cp/call.c index 16a6f9f0471..c74d1f40faa 100644 --- a/gcc/cp/call.c +++ b/gcc/cp/call.c @@ -782,8 +782,11 @@ standard_conversion (to, from, expr) enum tree_code ufcode = TREE_CODE (TREE_TYPE (from)); enum tree_code utcode = TREE_CODE (TREE_TYPE (to)); - if (utcode == VOID_TYPE && ufcode != OFFSET_TYPE - && ufcode != FUNCTION_TYPE) + if (comptypes (TYPE_MAIN_VARIANT (TREE_TYPE (from)), + TYPE_MAIN_VARIANT (TREE_TYPE (to)), 1)) + ; + else if (utcode == VOID_TYPE && ufcode != OFFSET_TYPE + && ufcode != FUNCTION_TYPE) { from = build_pointer_type (cp_build_type_variant (void_type_node, |