[omniORB] gcc 2.95 compiler warning

Stefan Seefeld seefelds@MAGELLAN.UMontreal.CA
Thu, 19 Aug 1999 20:45:39 +0000


I've no idea whether the following is relevant but I thought
I might report it anyway:

given the interface

interface Allocation
{
  struct Info
  {
    Region allocation;
    Transform transformation;
    Screen root;
  };
  Info get(in long l);
};

interface Graphic
{
  void extension(in Allocation::Info a, in Region r);
  void needRedraw();
};

and using it like:

void GraphicImpl::needRedraw()
{
  /*...*/
  Allocation::Info_var info = allocation->get(i);
  region->valid = false;
  extension(info, Region_var(region->_this()));
  /*...*/
};

yields a compiler waning

GraphicImpl.cc: In method `void GraphicImpl::needRedraw()':
GraphicImpl.cc:297: warning: choosing
`_CORBA_ConstrType_Variable_Var<Allocation::Info>::operator
Allocation::Info &()' over
`_CORBA_ConstrType_Variable_Var<Allocation::Info>::operator const
Allocation::Info &() const'
GraphicImpl.cc:297: warning:   for conversion from
`_CORBA_ConstrType_Variable_Var<Allocation::Info>' to `const
Allocation::Info &'
GraphicImpl.cc:297: warning:   because conversion sequence for the
argument is better

I think the compiler should definitely choose the const version of the
operator.
It might have no impact on the correctness of the program but it might
influence
the optimization capabilities.
By the way, gcc 2.95 takes even longer to compile code related to
omniORB. Also, the
stubs libraries are huge ! Can I expect them to shrink in future
versions of omniORB
or, on the contrary, will the generated code be even larger if we
migrate to POAs ?

Thanks !

Stefan

PS: I use omniORB 2.7.1 in conjunction with Duncan's LC patch.

_______________________________________________________              
              
Stefan Seefeld
Departement de Physique
Universite de Montreal
email: seefelds@magellan.umontreal.ca

_______________________________________________________

      ...ich hab' noch einen Koffer in Berlin...