Article View: gnu.g++.bug
Article #56g++ 1.35.1- dumps core on erroneous "pointer-to-member" usage.
From: Bryan Boreham
Date: Tue, 13 Jun 1989 19:19
Date: Tue, 13 Jun 1989 19:19
42 lines
1659 bytes
1659 bytes
The example:
extern "C" char* strcpy(char*, char*);
class Object;
typedef void* (Object::*PROC)(...);
class Object
{
public:
void getValue(PROC ptr, char* retValue)
{
strcpy(retValue, this->(*ptr));
}
};
kewill% g++ -c -v bug3.cc
g++ version 1.35.1-
/usr/local/lib/gcc-cpp -+ -v -undef -D__GNU__ -D__GNUG__ -D__cplusplus -Dmc6800
0 -Dsun -Dunix -D__mc68000__ -D__sun__ -D__unix__ -D__HAVE_68881__ -Dmc68020 bug
3.cc /tmp/cca02102.cpp
GNU CPP version 1.35
/usr/local/lib/gcc-cc1plus /tmp/cca02102.cpp -quiet -dumpbase bug3.cc -noreg -v
ersion -o /tmp/cca02102.s
GNU C++ version 1.35.1- (68k, MIT syntax) compiled by GNU C version 1.35.
bug3.cc:5: warning: lazy prototyping frowned upon
g++: Program cc1plus got fatal signal 6.
I know the code is wrong. As an aside, is there a way to make g++ shut
up about the lazy prototyping in places where I really do need it?
Or maybe I don't really need it, and someone can tell me more.
Bryan Boreham {The Atlantic} ... mcvax!ukc!root44!kewill!bryan
Software Engineer
Kewill Systems PLC Work: (+44) 932 248 328
Walton-On-Thames
Surrey KT12 2QS
England PS: I got the ET++ collections to work!
Technical Details
Message-ID:
<8906131919.AA02152@kewill.uucp>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!UUNET.UU.NET!kewill!bryanShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!UUNET.UU.NET!kewill!bryan From: kewill!bryan@UUNET.UU.NET (Bryan Boreham) Newsgroups: gnu.g++.bug Subject: g++ 1.35.1- dumps core on erroneous "pointer-to-member" usage. Message-ID: <8906131919.AA02152@kewill.uucp> Date: 13 Jun 89 19:19:46 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 42