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++/27519] New: Another's class destructor name


if u have 2 classes defined as:

class TPoints
        {
        TPoints(const TPoints&);
        TPoints& operator=(const TPoints&);
        friend class TPoligon;
        public:

        TPoints::TPoints(){}
        virtual ~TPoints();

        };

class TPoligon: public TPoints
        {
        TPoligon(const TPoligon&);//not impl
        TPoligon& operator=(const TPoligon&);//not impl

        public:

        TPoligon(){}
        virtual ~TPoligon();
        };

//and the functions
TPoints::~TPoligon()// !!!!! <-------- class TPoints and destructor of TPoligon
        {
        }

TPoints::~TPoints(){}

TPoligon::~TPoligon(){}

int main(){}


the code above compiles without warning!


-- 
           Summary: Another's class destructor name
           Product: gcc
           Version: 4.0.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: zvonsully at gmail dot com


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


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