* A C++ bug in gcc 2.8.0 and egcs 971207
@ 1997-12-14 20:16 H.J. Lu
1997-12-14 23:48 ` Patch for " Mark Mitchell
0 siblings, 1 reply; 2+ messages in thread
From: H.J. Lu @ 1997-12-14 20:16 UTC (permalink / raw)
To: egcs, gcc2
I got a C++ bug report for egcs 1.0 on linux/x86. It turns out also in
gcc 2.8.0. Basically gcc generates the following symbol in asm code
when __null is used:
call remove__H2Zt15__list_iterator3ZPiZRPiZPPiZP?_X01T0RCX11_X0
This bug may be platform independent.
Thanks.
H.J.
---
Forwarded message:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Patch for A C++ bug in gcc 2.8.0 and egcs 971207
1997-12-14 20:16 A C++ bug in gcc 2.8.0 and egcs 971207 H.J. Lu
@ 1997-12-14 23:48 ` Mark Mitchell
0 siblings, 0 replies; 2+ messages in thread
From: Mark Mitchell @ 1997-12-14 23:48 UTC (permalink / raw)
To: H.J. Lu; +Cc: egcs, gcc2
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:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1997-12-14 23:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-12-14 20:16 A C++ bug in gcc 2.8.0 and egcs 971207 H.J. Lu
1997-12-14 23:48 ` Patch for " Mark Mitchell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).