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]

[Bug c++/13422] New: `class A' only defines a private destructor and has no friends


While compiling class A, the compiler incorrectly warns:

   `class A' only defines a private destructor and has no friends

Class B is identical but with the methods reordered, and correctly compiles
without warnings.


class A {
public:
    void f();
    static A* New();
    static void Recycle(A*);
private:
    A();
    ~A();
};

class B {
public:
    static B* New();
    static void Recycle(B*);
    void f() {}
private:
    B();
    ~B();
};

-- 
           Summary: `class A' only defines a private destructor and has no
                    friends
           Product: gcc
           Version: 3.2.2
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: colby at alum dot mit dot edu
                CC: gcc-bugs at gcc dot gnu dot org


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


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