Archived
This forum has been archived. Please start a new discussion on GitHub.
Missing virtual destructor warnings
Hi,
I am compiling Ice 3.5.0 on a unsupported gcc version (3.4), on an unsupported OS (RedHat 4).
But I have no choice (else keeping my 3.4.2 Ice version of course).
I have some warnings about "has virtual functions but non-virtual destructor" (and some deprecated usage of methods - `subscribe' is deprecated )
And since there is a -Werror into the Make.rules.Linux, the compilation stop.
I was wondering if it was a deliberate choice to not put a virtual destructor
(include/Ice/MetricsObserverI.h for MetricsHelperT) or just an oversight.
By the way, I have remove the -Werror from the Make.rule.Linux file.
Regards,
David
I am compiling Ice 3.5.0 on a unsupported gcc version (3.4), on an unsupported OS (RedHat 4).
But I have no choice (else keeping my 3.4.2 Ice version of course).
I have some warnings about "has virtual functions but non-virtual destructor" (and some deprecated usage of methods - `subscribe' is deprecated )
And since there is a -Werror into the Make.rules.Linux, the compilation stop.
I was wondering if it was a deliberate choice to not put a virtual destructor
(include/Ice/MetricsObserverI.h for MetricsHelperT) or just an oversight.
By the way, I have remove the -Werror from the Make.rule.Linux file.
Regards,
David
0
Comments
-
Hi,
A virtual descriptor isn't strictly necessary here since objects of the MetricsHelperT class are never destructed with delete. Sounds like this GCC version is more verbose than recent GCC versions -- we didn't get this warning with any of the supported compilers.
Cheers,
Benoit.0 -
Hi,
Ok. I don't have access to a supported gcc ( 4.3 or 4.4).
I will try with 4.6.3, 4.7.3 and 4.8.0.
Anyway, it works fine
Regards,
David0