[omniORB] minor idl or msvc compiler bug ?
Barthel Marco (MPA/DS)
Marco.Barthel at tenovis.com
Fri Nov 28 12:16:05 GMT 2003
Hi All, Hi Duncan,
we run into some trouble if we compile the following idl-file (omniORB 4.0.3 and older)
module cc
{
module base
{
interface Data{};
};
};
#pragma prefix "cc/base"
interface Data : cc::base::Data {};
#pragma prefix ""
We use this because we want to move to Java, had no modules in the past and do not want to touch C++ Code massively.
results in stub-code is like this:
04 class POA_Data :
05 public virtual _impl_Data,
06 public virtual POA_cc::base::Data
07 {
08 public:
09 virtual ~POA_Data();
10
11 inline Data_ptr _this() {
12 return (Data_ptr) _do_this(Data::_PD_repoId);
13 }
14 };
MS-VC 6.0/7.1 can't compile the stubs because it can't find "Data::_PD_repoId" from line 12. The Compiler only searches the "POA_cc::base" namespace of the base class and can't find Data::_PD_repoId which is in the global namespace.
When I change the name of the base-interface from Data to LData the stubs compile - I do not understand why - can someone explain ?
When I change line 12 to
12 return (Data_ptr) _do_this(::Data::_PD_repoId);
by explicity refering to the global scope(added "::") it compiles. Do I mess up things with my change ?
If not, it would be nice if the change to the backend could be added to a future release.
Thanks.
-marco
More information about the omniORB-list
mailing list