[omniORB] v3 idl problems
Duncan Grisby
dgrisby@uk.research.att.com
Wed, 24 May 2000 17:05:24 +0100
On Wednesday 24 May, Matt Goodall wrote:
> struct Message {
> long message_no;
> char message[81];
> };
>
> The idl compiler gives this error: Instance identifier `message' clashes
> with name of enclosing scope `Message'.
[...]
> struct Switch {
> ...
> };
>
> I get the following error from the idl compiler: Identifier `Switch'
> clashes with keyword `switch'.
Both of these cases are indeed invalid IDL in CORBA 2.3, and omniidl
is right to complain about them. omniidl is intentionally very strict
about IDL conformance.
Section 3.2.3 of the 2.3 spec says "Identifiers which differ only in
case collide...". Section 3.15.2 says "The name of an interface,
value type, struct, ... may not be redefined within the immediate
scope of the interface, value type, struct,..." These two sections
taken together cause your first error.
Section 3.2.4 says "Identifiers that collide with keywords (see
section 3.2.3) are illegal." That causes your second error.
Cheers,
Duncan.
--
-- Duncan Grisby \ Research Engineer --
-- AT&T Laboratories Cambridge --
-- http://www.uk.research.att.com/~dpg1 --