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

Wolfgang Bangerth bangerth@ticam.utexas.edu
Sun Nov 10 12:06:00 GMT 2002


The following reply was made to PR c++/689; it has been noted by GNATS.

From: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: c++/689: this warning is not helpful: `class xxxx' only defines
 a private destructor and has no friend
Date: Sun, 10 Nov 2002 14:06:45 -0600 (CST)

 A simple testcase to show the problem is this:
 ---------------------
 class X
 {
   public:
     X();
   private:
     ~X();
 };
 ---------------------
 I get
 tmp/g> /home/bangerth/bin/gcc-3.3x-pre/bin/c++ -W -c x.cc
 x.cc:2: warning: `class X' only defines a private destructor and has no 
 friends
 
 -------------------------------------------------------------------------
 Wolfgang Bangerth              email:           bangerth@ticam.utexas.edu
                                www: http://www.ticam.utexas.edu/~bangerth
 
 



More information about the Gcc-prs mailing list