This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Patch for A C++ bug in gcc 2.8.0 and egcs 971207
- To: hjl at lucon dot org (H.J. Lu)
- Subject: Patch for A C++ bug in gcc 2.8.0 and egcs 971207
- From: Mark Mitchell <mmitchell at usa dot net>
- Date: Sun, 14 Dec 1997 23:48:11 GMT
- Cc: egcs at cygnus dot com, gcc2 at cygnus dot com
- References: <m0xhQbH-0004ecC@ocean.lucon.org>
- Reply-To: egcs at cygnus dot com
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: