This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

c++/5990: inheriting class constructors cannot use methods from parent classes outside of their class definitions.



>Number:         5990
>Category:       c++
>Synopsis:       inheriting class constructors cannot use methods from parent classes outside of their class definitions.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Sun Mar 17 09:26:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     kidmosey@musitu.org
>Release:        3.0.4
>Organization:
>Environment:

>Description:
The following C++ code causes an ICE with gcc versions above 2.95:

class A
{
public:
   A (void) { }
   ~A (void) { }

   void DoSomething (void) { }
};

class B: public A
{
public:
   B (void);
   ~B (void) { }
};

B::B (void)
{
  DoSomething();
}
>How-To-Repeat:
compile to an object file: gxx -c test.cpp
>Fix:
remove the destructor from class A - quite undesirable.
>Release-Note:
>Audit-Trail:
>Unformatted:


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