[omniORB] Big unsigned long constants in IDL

Duncan Grisby duncan@grisby.org
Wed Oct 9 22:11:01 2002


On Tuesday 8 October, Leandro Fanzone wrote:
> Hello. When using the following declaration in an IDL
> 
>    const unsigned long SOME_CONSTANT = 0xFFFFFFFF;
> 
> the generated code (omniORB 3.0.4) in C++ is
> 
>    static _code_attr const CORBA::ULong NOT_SPECIFIED _init_in_cldecl_( 
> = 4294967295 );
> 
> which is apparently correct, but the compiler (gcc 3.1 on Linux) complains:
> 
>    warning: decimal constant is so large that it is unsigned.

The reason for not putting a U at the end is that it fails on at least
one compiler (I can't remember which off hand). I'm not aware of any
compilers on which it fails totally. We decided it was best to live
with the warning that to introduce yet another portability macro for
it.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan@grisby.org     --
   -- http://www.grisby.org --