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++/5573: typedef in member's derived class causes crash when a class with the same name exists in the base class



>Number:         5573
>Category:       c++
>Synopsis:       typedef in member's derived class causes crash when a class with the same name exists in the base class
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 01 10:56:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     a.hendriks@b-lex.nl
>Release:        trunk
>Organization:
>Environment:
i686-pc-linux-gnu
>Description:
When class X has a (member) subclass that created a typedef, and this typedef has the same name as a class inside the base class of class X, g++ crashes with an internal error in pop_binding.

This happens in 2.95 and 3.0 as well.

>How-To-Repeat:
struct A
{
  class AN { };
};
struct B
{
  typedef int AN;
};
struct C : A
{
  struct CN : public B { };                 
  class AN { };
};
>Fix:

>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]