This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/16019] New: Redundant warning `class X' only defines private constructors and has no friends
- From: "amos at ilogix dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Jun 2004 12:09:43 -0000
- Subject: [Bug c++/16019] New: Redundant warning `class X' only defines private constructors and has no friends
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The warning "`class X' only defines private constructors and has no friends"
is redundant when using a typical singleton pattern implementation yet there
is no way to turn it off.
In a project with few singletons it cause redundant "noise" in the compiler
output.
example:
--------
class X
{
public:
// get X singleton instance
static X* instance();
private:
// prevent direct initialization
X();
};
--
Summary: Redundant warning `class X' only defines private
constructors and has no friends
Product: gcc
Version: 3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: amos at ilogix dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: 3.2
GCC host triplet: Any
GCC target triplet: Any
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16019