After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 108047 - multiple inheritance problem in IDL compiler
multiple inheritance problem in IDL compiler
Status: RESOLVED FIXED
Product: orbit-cpp
Classification: Deprecated
Component: idl-compiler
1.3
Other Linux
: Normal normal
: ---
Assigned To: ÉRDI Gergõ
ÉRDI Gergõ
Depends on:
Blocks:
 
 
Reported: 2003-03-10 21:46 UTC by Bowie Owens
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.1/2.2



Description Bowie Owens 2003-03-10 21:46:30 UTC
I am having some difficulty with ORBit cpp (orbitcpp-1.3.4, ORBit2-2.6.0)
and multiple inheritance of interfaces. I have the following file mi.idl:

module foo {

       interface Symbol {
               string name();
       };

       interface Hash {
               long hash();
       };

       interface Variable : Symbol, Hash {
       };
};

Compiling the idl and then the stubs file causes problems with multiple
definition of Hash::hash() where the second definition should probably be
Variable::hash().

[owe043@phi bug]$ orbit-idl-2 mi.idl ; orbit-idl-2 -l cpp mi.idl ; g++ -c
mi-cpp.cc `pkg-config ORBit-2.0-cpp --cflags`
orbit-idl-2 2.6.0 compiling
 mode, show preprocessor errors, passes: stubs skels common headers
skel_impl imodule

orbit-idl-2 2.6.0 compiling
 mode, show preprocessor errors, passes: stubs skels common headers
skel_impl imodule


** (process:4194): WARNING **: orbit_idl_backend_func

In file included from mi-cpp.cc:7:
mi-cpp-stubs.cc:60: redefinition of `Long _orbitcpp::stub::foo::Hash::hash()'
mi-cpp-stubs.cc:36: `Long _orbitcpp::stub::foo::Hash::hash()' previously
  defined here
mi-cpp-stubs.cc:60: no `Long _orbitcpp::stub::foo::Hash::hash()' member
  function declared in class `_orbitcpp::stub::foo::Hash'
mi-cpp-stubs.cc:63: confused by earlier errors, bailing out


Below is the contents of mi-cpp-stubs.cpp.

// -----------------------------------------------------
// generated by orbitcpp, do not edit
// -----------------------------------------------------
 
 
#include "mi-cpp-stubs.h"
 
 
// Stub code -------------------------------------------
 
        char * _orbitcpp::stub::foo::Symbol::name ()
{
 
        ::_orbitcpp::CEnvironment _ev;
        char *_retval = foo_Symbol_name (_orbitcpp_cobj (), 
_ev._orbitcpp_cobj ());
        _ev.propagate_sysex ();
                if (_ev->_major == ::CORBA_USER_EXCEPTION)
        {
                throw CORBA::UnknownUserException();
        }
 
 
        return _retval;
}
 
_orbitcpp::stub::foo::Symbol::Symbol (foo_Symbol cobject, bool take_copy
/*= false */):
CORBA::Object(cobject, take_copy)
{}
 
        ::_orbitcpp::stub::foo::Symbol *
_orbitcpp::stub::foo::Symbol::_orbitcpp_wrap (foo_Symbol cobject, bool
take_copy /* = false */)
{
        return new ::_orbitcpp::stub::foo::Symbol (cobject, take_copy);
}
 
        CORBA::Long _orbitcpp::stub::foo::Hash::hash ()
{
 
        ::_orbitcpp::CEnvironment _ev;
        CORBA::Long _retval = foo_Hash_hash (_orbitcpp_cobj (), 
_ev._orbitcpp_cobj ());
        _ev.propagate_sysex ();
                if (_ev->_major == ::CORBA_USER_EXCEPTION)
        {
                throw CORBA::UnknownUserException();
        }
 
 
        return _retval;
}
 
_orbitcpp::stub::foo::Hash::Hash (foo_Hash cobject, bool take_copy /*=
false */):
CORBA::Object(cobject, take_copy)
{}
 
        ::_orbitcpp::stub::foo::Hash *
_orbitcpp::stub::foo::Hash::_orbitcpp_wrap (foo_Hash cobject, bool
take_copy /* = false */)
{
        return new ::_orbitcpp::stub::foo::Hash (cobject, take_copy);
}
 
        CORBA::Long _orbitcpp::stub::foo::Hash::hash ()
{
 
        ::_orbitcpp::CEnvironment _ev;
        CORBA::Long _retval = foo_Hash_hash (_orbitcpp_cobj (), 
_ev._orbitcpp_cobj ());
        _ev.propagate_sysex ();
                if (_ev->_major == ::CORBA_USER_EXCEPTION)
        {
                throw CORBA::UnknownUserException();
        }
 
 
        return _retval;
}
 
_orbitcpp::stub::foo::Variable::Variable (foo_Variable cobject, bool
take_copy /*= false */):
::_orbitcpp::stub::foo::Symbol(cobject, take_copy)
{}
 
        ::_orbitcpp::stub::foo::Variable *
_orbitcpp::stub::foo::Variable::_orbitcpp_wrap (foo_Variable cobject, bool
take_copy /* = false */)
{
        return new ::_orbitcpp::stub::foo::Variable (cobject, take_copy);
}
Comment 1 ÉRDI Gergõ 2003-03-11 17:55:05 UTC
Fixed in CVS HEAD