This is the mail archive of the gcc@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]

Patch for A C++ bug in gcc 2.8.0 and egcs 971207



Here's a fix for things like this:

    template <class T>
    void remove(const T& value)
    {
    }


    void f()
    {
      remove(__null);
    }

which were resulting in bad manglings of remove.

-- 
Mark Mitchell		mmitchell@usa.net
Stanford University	http://www.stanford.edu

1997-12-14  Mark Mitchell  <mmitchell@usa.net>

	    * method.c (build_overload_name): Fix mangling for __null.

Index: method.c
===================================================================
RCS file: /home/mitchell/Repository/egcs/gcc/cp/method.c,v
retrieving revision 1.4
diff -c -p -r1.4 method.c
*** method.c	1997/12/07 17:48:55	1.4
--- method.c	1997/12/15 07:40:46
*************** build_overload_name (parmtypes, begin, e
*** 1047,1054 ****
  	  }
  
  	case UNKNOWN_TYPE:
! 	  /* This will take some work.  */
! 	  OB_PUTC ('?');
  	  break;
  
  	case TEMPLATE_TYPE_PARM:
--- 1047,1056 ----
  	  }
  
  	case UNKNOWN_TYPE:
! 	  /* We can get here if __null is defined to have type ({unkown
! 	     type}*), which it is if -ansi is not used.  Treat this
! 	     like 'void*'.  */
! 	  OB_PUTC ('v');
  	  break;
  
  	case TEMPLATE_TYPE_PARM:


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