[omniORB] Case problems in IDL

Gary D. Duzan gdd0@gte.com
Thu, 02 Sep 1999 14:07:18 -0400


>From CORBA 2.2 (but stated similarly since 2.0):

    Identifiers that differ only in case collide and yield a
    compilation error. An identifier for a definition must be spelled
    consistently (with respect to case) throughout a specification.

    When comparing two identifiers to see if they collide:

      * Upper- and lower-case letters are treated as the same letter.
	Table 3-2 on page 3-3 defines the equivalence mapping of upper-
	and lower-case letters.

      * The comparison does not take into account equivalences between
	digraphs and pairs of letters [ ... ]

      * All characters are significant.

So OmniIDL is correct to flag this as an error. The other ORBs are
wrong to be more permissive in the IDL they allow, and for this
reason it is often a good idea to run a new IDL file through OmniIDL
early on to check for portability.
   On the other hand, the error message isn't as enlightening as
one might hope.

					Gary Duzan
					GTE Laboratories



In Message <19990902135124.A880@mediaone.net> ,
   Craig Rodrigues <rodrigc@mediaone.net> wrote:

=>Hi,
=>
=>If I have the following bit of IDL:
=>
=>
=>     typedef sequence<short> Somethings;
=>
=>      struct someStruct{
=>          Somethings somethings;
=>      };
=>
=>
=>omniidl2 will flag this as an error:
=>line 6: redefinition after use, ::someStruct::somethings, ::someStruct,
=> ::Somethings
=>bin/powerpc_aix_4.2/omniidl2: test4.idl: found 2 errors
=>
=>What are the CORBA rules about the case of type and variable names?
=>
=>I tried compiling the same bit of IDL under TAO, Orbacus, and Visibroker,
=>and none of those IDL compilers complained.
=>
=>Thanks.
=>-- 
=>Craig Rodrigues        
=>http://www.gis.net/~craigr    
=>rodrigc@mediaone.net          
=>