[omniORB] TRUE, FALSE, and long

David Riddoch djr@uk.research.att.com
Wed, 26 May 1999 12:10:05 +0100 (GMT)


On Wed, 26 May 1999, Laurent Pointal wrote:

> [omniORB2.7.1, NT4SP1]
> 
> Hello,
> 
> I recently make the following error in one of my IDL files:
> 
> 	const long MY_VALUE	= FALSE ;
> 
> omniidl2 has no problem with that, but when I use another IDL compiler, I
> get an error about incompatible types... posting in the list of the other
> ORB, it seems that TRUE/FALSE are values for a boolean, not for a long (as
> they can be used in C/C++). Can omniidl2 be modified to refuse boolean
> values for long types?

Sorry, but I don't think this is worth the effort at the moment. Lots of
more important things to fix/improve/implement!

> As I deal with problem of bool values, I have a recurent warning from
> omniorb sources:
> 
> Q:\omniorb_2.7.1\include\omniORB2/bufferedStream.h(621) : warning C4800:
> 'unsigned char' : forcing value to bool 'true' or 'false' (performance
> warning)
> 
> If the "pd_byte_order = b;" could be replaced by "pd_byte_order = (b==0);",
> I think this will remove the warning.

Yes it will remove the warning.  Unfortunately it will also break the
code!

I think you meant  "pd_byte_order = (b!=0);"

Cheers,
David