[omniORB] -Woverloaded-virtual compiler warnings since 4.2.3 or 4.2.4

Michael Teske subscribe at teskor.de
Tue Apr 28 22:19:23 UTC 2020


Am 28/04/2020 um 14:46 schrieb Michael Teske via omniORB-list:
> Hi,
> 
> we recently upgraded our used omniORB version from 4.2.2 to 4.2.4. Since then we get these annoying g++ compiler warnings:

I just found out that the diffs do not come from the omniORB version but from the used python version. We switched from 
python 2.7 to 3.6 in the 4.2.3 build, and I just confirmed that the _PR_copy_state()-methods are not virtual when 
building with 2.7, and virtual when building with 3.6. I assume the output of the idl compiler should be the same, 
independent of the python version, so something's wrong here IMHO.

Greetings,
   Michael


> ../include/omniORB4/pollable_defs.hh:96:16: warning: ‘virtual void CORBA::Pollable::_PR_copy_state(CORBA::Pollable*)’ 
> was hidden [-Woverloaded-virtual]
>     virtual void _PR_copy_state(Pollable*);
>                  ^~~~~~~~~~~~~~
> ../include/omniORB4/pollable_defs.hh:178:16: warning:   by ‘virtual void 
> CORBA::DIIPollable::_PR_copy_state(CORBA::DIIPollable*)’ [-Woverloaded-virtual]
>     virtual void _PR_copy_state(DIIPollable*);
>                  ^~~~~~~~~~~~~~
> ../include/omniORB4/pollable_defs.hh:96:16: warning: ‘virtual void CORBA::Pollable::_PR_copy_state(CORBA::Pollable*)’ 
> was hidden [-Woverloaded-virtual]
>     virtual void _PR_copy_state(Pollable*);
>                  ^~~~~~~~~~~~~~
> In file included from ../include/omniORB4/CORBA.h:283:0,
> 
> Usually this indicates a bug, but this of course need not be the case here.
> 
> When I check at our builds, the change was between 4.2.2 and 4.2.3:
> $ diff -c  422/include/omniORB4/pollable_defs.hh 423/include/omniORB4/pollable_defs.hh
> *** 422/include/omniORB4/pollable_defs.hh       2019-04-18 16:56:07.000000000 +0200
> --- 423/include/omniORB4/pollable_defs.hh       2020-04-06 20:20:51.000000000 +0200
> ***************
> *** 93,99 ****
> 
>      virtual void _PR_marshal_state(cdrStream&) const;
>      virtual void _PR_unmarshal_state(cdrStream&);
> !   void _PR_copy_state(Pollable*);
> 
>      static _core_attr const char* _PD_repoId;
> 
> --- 93,99 ----
> 
>      virtual void _PR_marshal_state(cdrStream&) const;
>      virtual void _PR_unmarshal_state(cdrStream&);
> !   virtual void _PR_copy_state(Pollable*);
> 
>      static _core_attr const char* _PD_repoId;
> 
> ***************
> *** 175,181 ****
> 
>      virtual void _PR_marshal_state(cdrStream&) const;
>      virtual void _PR_unmarshal_state(cdrStream&);
> !   void _PR_copy_state(DIIPollable*);
> 
>      static _core_attr const char* _PD_repoId;
> 
> --- 175,181 ----
> 
>      virtual void _PR_marshal_state(cdrStream&) const;
>      virtual void _PR_unmarshal_state(cdrStream&);
> !   virtual void _PR_copy_state(DIIPollable*);
> 
>      static _core_attr const char* _PD_repoId;
> 
> 
> 
> since pollable_defs.hh is generated from pollable.idl, this indicates a subtle change in the idl compiler. I can't judge 
> if this was intended or not so I thought I'd post it here. Of course I can switch off -Woverloaded-virtual but normally, 
> this is a very useful warning IMHO. Is it possibly to prevent that here?
> 
> 
> Greetings,
> 
> _______________________________________________
> omniORB-list mailing list
> omniORB-list at omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list




More information about the omniORB-list mailing list