[omniORB] omniidl2 and unions

David Riddoch djr@uk.research.att.com
Wed, 3 Mar 1999 10:41:53 +0000 (GMT)


Hi Cameijo,


You're right, omniidl2 does not support multiple labels for union members.
Thanks for the patch - but such a change would also require a number of
changes to the runtime, so I can't integrate it just at the moment.


Thanks,
David



On Thu, 25 Feb 1999, J. Cameijo Cerdeira wrote:

> Hello,
> 
> I've started playing with omniORB and noticed the idl compiler rejects
> the following idl file (which must be correct since it's borrowed from
> the corba 2 spec) complaining about the redefinition of U::w :
> 
> module dummy {
> 
> typedef octet Bytes[64];
> struct S { short s; };
> 
> interface A;
> 
> union U switch (long) {
> 	case 1: long x;
> 	case 2: Bytes y;
> 	case 3: string z;
> 	case 4:
> 	case 5: S w;
> 	default: A obj;
> 	};
> };
> 
> in fact omniidl2 interprets the above union as
> 
> union U switch (long) {
> 	case 1: long x;
> 	case 2: Bytes y;
> 	case 3: string z;
> 	case 4: S w;
> 	case 5: S w;
> 	default: A obj;
> 	};
> 
> I think this is a bug in omniidl2 isn't it ?
> 
> Anyway i've hacked the src a little bit and came up with the following
> quick'n'dirty patch which i think solves the problem (i've not done an
> extensive testing, though).
> 
> J. Cameijo Cerdeira
>