Home Comments

Missing virtual destructor warnings

D. FleuryD. Fleury Member David FLEURYOrganization: ConsertoProject: GSM Capture
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

Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    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.
  • D. FleuryD. Fleury Member David FLEURYOrganization: ConsertoProject: GSM Capture
    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,
    David
Sign In or Register to comment.