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]

c++/689: this warning is not helpful: `class xxxx' only defines a private destructor and has no friend



>Number:         689
>Category:       c++
>Synopsis:       this warning is not helpful: `class xxxx' only defines a private destructor and has no friend
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 25 14:56:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Jeff Hill
>Release:        unknown-1.0
>Organization:
>Environment:
All
>Description:

warning: `class xxxx' only defines a private destructor and has no friend

This warning is not helpful and it cant be turned off.
It is quite normal (see Meyers) to have a private 
destructor and no friends if you intend to force creation only with new.

% g++ -v
Reading specs from /opt/gnu/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/specs
gcc version 2.95.2 19991024 (release)
>How-To-Repeat:

all classes with a private destructor causes the warning.
>Fix:

Its not clear that this warning should be generated.
>Release-Note:
>Audit-Trail:
>Unformatted:

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