* call.c (standard_conversion): Handle A* -> const A* properly.

From-SVN: r18718
This commit is contained in:
Jason Merrill 1998-03-19 21:37:25 +00:00 committed by Jason Merrill
parent 09b4ce121b
commit 4d50dd6901
2 changed files with 7 additions and 2 deletions

View File

@ -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.

View File

@ -782,7 +782,10 @@ 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
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