[omniORB] is this an omniidl bug or feature?
Duncan Grisby
duncan at grisby.org
Fri Oct 13 09:15:11 BST 2006
On Friday 13 October, "Wernke zur Borg" wrote:
[...]
> > 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.
>
> omniIDL is right. Perhaps it should have spotted the illegal underscore
> character instead of ignoring it. See the spec here:
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 if
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 underscore
is only used to escape clashes with keywords, not with other
identifiers.
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan at grisby.org --
-- http://www.grisby.org --
More information about the omniORB-list
mailing list