This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

(C++) patch to add_builtin_candidates


Fixes g++.martin/sts_conv.C.

1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>

	* call.c (add_builtin_candidates): Handle overloaded conversion ops.

Index: call.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/cp/call.c,v
retrieving revision 1.135
diff -c -p -r1.135 call.c
*** call.c	1999/03/09 23:02:29	1.135
--- call.c	1999/03/10 08:56:57
*************** add_builtin_candidates (candidates, code
*** 1868,1874 ****
  	;
        else if (IS_AGGR_TYPE (argtypes[i]))
  	{
! 	  tree convs = lookup_conversions (argtypes[i]);
  
  	  if (i == 0 && code == MODIFY_EXPR && code2 == NOP_EXPR)
  	    return candidates;
--- 1868,1874 ----
  	;
        else if (IS_AGGR_TYPE (argtypes[i]))
  	{
! 	  tree convs;
  
  	  if (i == 0 && code == MODIFY_EXPR && code2 == NOP_EXPR)
  	    return candidates;
*************** add_builtin_candidates (candidates, code
*** 1890,1896 ****
  
  	  for (; convs; convs = TREE_CHAIN (convs))
  	    {
! 	      type = TREE_TYPE (TREE_TYPE (TREE_VALUE (convs)));
  
  	      if (i == 0 && ref1
  		  && (TREE_CODE (type) != REFERENCE_TYPE
--- 1890,1896 ----
  
  	  for (; convs; convs = TREE_CHAIN (convs))
  	    {
! 	      type = TREE_TYPE (TREE_TYPE (OVL_CURRENT (TREE_VALUE (convs))));
  
  	      if (i == 0 && ref1
  		  && (TREE_CODE (type) != REFERENCE_TYPE


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]