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++/16019] New: Redundant warning `class X' only defines private constructors and has no friends


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


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