[omniORB] is this an omniidl bug or feature?

JiangWei jw.omni at sduept.com
Mon Oct 16 23:53:35 BST 2006


Duncan Grisby =D0=B4=B5=C0:
> On Friday 13 October, "Wernke zur Borg" wrote:
>
> [...]
>  =20
>>> struct test
>>> {
>>>         L _l;
>>> };
>>>
>>> [jw at dell idl]$ omniidl x.idl
>>> omniidl: Warning: No back-ends specified; checking IDL for validity
>>> x.idl:5: Instance identifier 'l' clashes with use of identifier 'L'
>>> x.idl:5:  ('L' used here)
>>> omniidl: 1 error.
>>>      =20
>> omniIDL is right. Perhaps it should have spotted the illegal underscor=
e
>> character instead of ignoring it. See the spec here:
>>    =20
>
> omniidl is right about ignoring the underscore too -- it's not illegal.
> Section 3.2.3.1 of the 2.6 spec says:
>
>   To minimize the amount of work, users may lexically "escape"
>   identifiers by prepending an underscore (_) to an identifier. This is
>   a purely lexical convention that ONLY turns off keyword checking. The
>   resulting identifier follows all the other rules for identifier
>   processing. For example, the identifier _AnIdentifier is treated as i=
f
>   it were AnIdentifier.
>
> So in the example, _l is treated as if it was just l, and then it
> clashes with the type identifier L.
>
> I guess the IDL is attempting to avoid the clash with the identifier by
> using the underscore, but as the section I quoted states, the underscor=
e
> is only used to escape clashes with keywords, not with other
> identifiers.
>
> Cheers,
>
> Duncan.
>
>  =20
Understand now, thank you.



More information about the omniORB-list mailing list