This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13422] New: `class A' only defines a private destructor and has no friends
- From: "colby at alum dot mit dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Dec 2003 20:51:35 -0000
- Subject: [Bug c++/13422] New: `class A' only defines a private destructor and has no friends
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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