Archived
This forum has been archived. Please start a new discussion on GitHub.
Gcc 4.0.1 mini patch.
Hi,
Compiling with gcc 4.0.1 seems to work fine, but it complains about missing virtual destructors now and then:
../../include/IceUtil/AbstractMutex.h:20: warning: ‘class IceUtil::AbstractMutex’ has virtual functions but non-virtual destructor
etc..
Thinking about whether or not this is Bad with all the multiple inheritance going on makes my head explode, so below is a naive patchlet that adds a virtual destructor.
Don't think it would do any harm, but might as well be entirely useless
Cheers,
Rob
Compiling with gcc 4.0.1 seems to work fine, but it complains about missing virtual destructors now and then:
../../include/IceUtil/AbstractMutex.h:20: warning: ‘class IceUtil::AbstractMutex’ has virtual functions but non-virtual destructor
etc..
Thinking about whether or not this is Bad with all the multiple inheritance going on makes my head explode, so below is a naive patchlet that adds a virtual destructor.
diff -Nur Ice-2.1.2.orig/include/IceUtil/AbstractMutex.h Ice-2.1.2.gcc-4.0.1/include/IceUtil/AbstractMutex.h --- Ice-2.1.2.orig/include/IceUtil/AbstractMutex.h 2005-02-17 04:22:17.000000000 +0800 +++ Ice-2.1.2.gcc-4.0.1/include/IceUtil/AbstractMutex.h 2005-07-12 17:13:27.000000000 +0800 @@ -26,6 +26,9 @@ virtual void lock() const = 0; virtual void unlock() const = 0; virtual bool tryLock() const = 0; + + virtual ~AbstractMutex() + {} }; template <typename T>
Don't think it would do any harm, but might as well be entirely useless

Cheers,
Rob
0