[Bug c++/47450] New: Anonymous top-level classes assigned to static members fail.

drahflow at gmx dot de gcc-bugzilla@gcc.gnu.org
Mon Jan 24 23:05:00 GMT 2011


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47450

           Summary: Anonymous top-level classes assigned to static members
                    fail.
           Product: gcc
           Version: 4.5.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: drahflow@gmx.de


class A {
  public:
    virtual void f() = 0;
};

class B {
    static A *a;
};

A *B::a = new (class: public A {
  public:
    void f() { }
});

results in

01.c++:10:32: internal compiler error: in nested_anon_class_index, at
cp/mangle.c:1294

g++-4.4 accepts the code on my system.



More information about the Gcc-bugs mailing list