Discussion:
[Bug c++/16019] New: Redundant warning `class X' only defines private constructors and has no friends
amos at ilogix dot com
2004-06-16 12:09:43 UTC
Permalink
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
bangerth at dealii dot org
2004-06-16 14:01:52 UTC
Permalink
------- Additional Comments From bangerth at dealii dot org 2004-06-16 14:01 -------
I can't seem to reproduce your error message. Please post the exact
source and command line switches you use.

Thanks
Wolfgang
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|Redundant warning `class X' |Redundant warning `class X'
|only defines private |only defines private
|constructors and has no |constructors and has no
|friends |friends


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16019
pinskia at gcc dot gnu dot org
2004-06-16 21:22:35 UTC
Permalink
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16019
pinskia at gcc dot gnu dot org
2004-07-02 21:17:15 UTC
Permalink
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-02 21:17 -------
Fixed 3.3 already, closing.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Keywords| |diagnostic
Known to fail| |3.2.3
Known to work| |3.3 3.4.0 3.5.0
Resolution| |FIXED
Target Milestone|--- |3.3


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