[omniORB] -Woverloaded-virtual compiler warning

Michael Teske subscribe at teskor.de
Tue Feb 24 09:18:55 GMT 2015


Hi Duncan

Am 23.02.15 um 13:39 schrieb Duncan Grisby:
> On Mon, 2015-02-23 at 09:34 +0100, Michael Teske wrote:
> 
> [...]
>> In file included from /Users/mteske/build/trader/OSX_64/GCC421/Debug-static-mthr/include/omniORB4/CORBA.h:285:
>> /Users/mteske/build/trader/OSX_64/GCC421/Debug-static-mthr/include/omniORB4/messaging.hh:252:18: warning: 'Messaging::Poller::_PR_copy_state' hides overloaded virtual function [-Woverloaded-virtual]
>>     virtual void _PR_copy_state(Poller*);
>>                  ^
>> /Users/mteske/build/trader/OSX_64/GCC421/Debug-static-mthr/include/omniORB4/pollable_defs.hh:96:16: note: hidden overloaded virtual function 'CORBA::Pollable::_PR_copy_state' declared here: type
>>       mismatch at 1st parameter ('CORBA::Pollable *' vs 'Messaging::Poller *')
>>   virtual void _PR_copy_state(Pollable*);
>>
>> I'd really like to shut that off. One could add a 
>> using DIIPollable::_PR_copy_state;
>> directive so that both methods are available
>>  or disable the compiler warning if the hiding was intended. 
>>
>> So... what _was_ intended?
> 
> The hiding is intended, so it's unfortunate that it provokes the
> compiler warning. It doesn't warn with the versions of GCC I've tried.

It only warns if you have -Woverloaded_virtual explicitely switched on,
at least with 4.9.2.
Anyway, thanks for the quick reply and the explanation, with your patch
the warning is gone :)

Regards,
  Michael





More information about the omniORB-list mailing list