[omniORB] omniidl2 bug?

Duncan Grisby dgrisby@uk.research.att.com
Fri, 28 Apr 2000 11:04:27 +0100


On Thursday 27 April, "Alik Kurdjukov" wrote:

> module ModA {
> 	module ModB {
> 		interface IntC {};
> 	};
> 	interface IntA;
> 	module ModB {
> 		interface IntB : IntC{
> 			IntA xxx();
> 		};
> 	};
> };
> ======
> After compiling with omniidl2 the resuling .h and .cpp are not compilable
> because in header file definition of IntA goes after definition of IntB.
> 
> Is there any workaround with this bug?

This isn't so much a bug as an intentional feature to work around
problems with compilers which don't support C++ namespace.
Unfortunately, it clobbers you here.

The IDL above is actually invalid, since you never fully define IntA
-- I assume your example actually has

  interface IntA {};

You can work-around omniidl2's behaviour by putting a forward
declaration of IntA before you first open ModB.

I'll look into removing omniidl2's module reorganisation, or at least
making it optional.

Cheers,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --