[Coin-discuss] Re: various warnings by .NET compiler

Laszlo Ladanyi ladanyi at us.ibm.com
Sun May 21 21:20:49 EDT 2006


Hi Matt,

You are right, most of these warnings are about int being 4 bytes on all
platforms, but size_t being 4/8 bytes on different platforms. You are right   
that we should eventually fix this, but it's not too high priority, I
guess. If you need to work with vectors where the number of entries is more   
then 2 billion then you are dead in the water anyway :-).

However, in the list of errors there were these:

On Sun, 21 May 2006, Matthew Galati wrote:

> More warnings... Most refer to issues related to 32 to 64-bit portability - and you might want to investigate.
> 
> Matt
> 
 ... 
> 
> ClpCholeskyDense.cpp
> c:\cygwin\home\magala\COIN\Clp\ClpCholeskyDense.cpp(646) : warning C4554: '<<' : check operator precedence for possible error; use parentheses to clarify precedence
> c:\cygwin\home\magala\COIN\Clp\ClpCholeskyDense.cpp(647) : warning C4554: '<<' : check operator precedence for possible error; use parentheses to clarify precedence
> c:\cygwin\home\magala\COIN\Clp\ClpCholeskyDense.cpp(648) : warning C4554: '<<' : check operator precedence for possible error; use parentheses to clarify precedence

I'm not certain, but I believe these are the result of not having parentheses
in the #define of BLOCKSQSHIFT (line 77). I can't test my theory (g++ doesn't
complain), but could you test it and let me know? Just replace the line:
      #define BLOCKSQSHIFT BLOCKSHIFT+BLOCKSHIFT
with
      #define BLOCKSQSHIFT (BLOCKSHIFT+BLOCKSHIFT)
(While you are at it, you could do the same in the preceeding line for the
definition of BLOCKSQ.)

Let me know whether this helps; if it does, I'll commit the change.

Thanks,
--Laci





More information about the Coin-discuss mailing list