Article View: gnu.g++.bug
Article #161g++ 2.2.2 Nested class destructors
From: J. Frisbie
Date: Fri, 24 Jul 1992 12:34
Date: Fri, 24 Jul 1992 12:34
42 lines
1141 bytes
1141 bytes
On an DECstation 5000 running Ultrix 4.2A, with a generically
installed gcc 2.2.2, compiling the program listed below causes
the following error message:
gcc: Internal compiler error: program cc1plus got fatal signal 11
Constructors and other member functions for the nested class do
not generate the error. If the destructor is defined inside the
class (as in the second program) it also seems to work.
The program that fails:
class A {
protected:
class B {
public:
~B();
private:
float _datum;
};
private:
B *_b;
};
A::B::~B()
{
_datum = 8.0;
}
A program that compiles:
class A {
protected:
class B {
public:
~B() { _datum = 8.0; }
private:
float _datum;
};
private:
B *_b;
};
Technical Details
Message-ID:
<199207242034.AA27592@stan.mit.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!stan.mit.edu!jfShow Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!stan.mit.edu!jf From: jf@stan.mit.edu (J. Frisbie) Subject: g++ 2.2.2 Nested class destructors Message-ID: <199207242034.AA27592@stan.mit.edu> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Fri, 24 Jul 1992 12:34:43 GMT Approved: bug-g++@prep.ai.mit.edu Lines: 44