[Coin-discuss] exception specifications
Matthew Galati
Matthew.Galati at sas.com
Sun May 21 15:03:16 EDT 2006
More warnings... Most refer to issues related to 32 to 64-bit portability - and you might want to investigate.
Matt
CglMixedIntegerRounding2.cpp
c:\cygwin\home\magala\COIN\Coin\include\CoinHelperFunctions.hpp(33) : warning C4244: 'initializing' : conversion from '__w64 int' to 'const int', possible loss of data
c:\cygwin\home\magala\COIN\Coin\include\CoinHelperFunctions.hpp(125) : see reference to function template instantiation 'void CoinCopyN<T>(const T *,const int,T *)' being compiled
with
[
T=CglMixIntRoundVUB2
]
c:\cygwin\home\magala\COIN\Cgl\CglMixedIntegerRounding2.cpp(239) : see reference to function template instantiation 'void CoinDisjointCopyN<CglMixIntRoundVUB2>(const T *,const int,T *)' being compiled
with
[
T=CglMixIntRoundVUB2
]
CoinWarmStartBasis.cpp
c:\cygwin\home\magala\COIN\Coin\CoinWarmStartBasis.cpp(221) : warning C4244: 'initializing' : conversion from '__w64 int' to 'int', possible loss of data
Idiot.cpp
c:\cygwin\home\magala\COIN\Clp\include\ClpPresolve.hpp(127) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
ClpSolve.cpp
c:\cygwin\home\magala\COIN\Clp\include\ClpPresolve.hpp(127) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
c:\cygwin\home\magala\COIN\Clp\ClpSolve.cpp(2145) : warning C4800: 'double' : forcing value to bool 'true' or 'false' (performance warning)
ClpSimplexPrimal.cpp
c:\cygwin\home\magala\COIN\Clp\ClpSimplexPrimal.cpp(987) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
ClpSimplex.cpp
c:\cygwin\home\magala\COIN\Clp\include\ClpPresolve.hpp(127) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
c:\cygwin\home\magala\COIN\Clp\ClpSimplex.cpp(5050) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
c:\cygwin\home\magala\COIN\Clp\ClpSimplex.cpp(5053) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
c:\cygwin\home\magala\COIN\Clp\ClpSimplex.cpp(5058) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
c:\cygwin\home\magala\COIN\Clp\ClpSimplex.cpp(5102) : warning C4267: '=' : conversion from 'size_t' to 'CoinBigIndex', possible loss of data
c:\cygwin\home\magala\COIN\Clp\ClpSimplex.cpp(5110) : warning C4267: '=' : conversion from 'size_t' to 'CoinBigIndex', possible loss of data
c:\cygwin\home\magala\COIN\Clp\ClpSimplex.cpp(5111) : warning C4267: '=' : conversion from 'size_t' to 'CoinBigIndex', possible loss of data
c:\cygwin\home\magala\COIN\Clp\ClpSimplex.cpp(5115) : warning C4267: '=' : conversion from 'size_t' to 'CoinBigIndex', possible loss of data
c:\cygwin\home\magala\COIN\Clp\ClpSimplex.cpp(5158) : warning C4267: '=' : conversion from 'size_t' to 'CoinBigIndex', possible loss of data
c:\cygwin\home\magala\COIN\Clp\ClpSimplex.cpp(5161) : warning C4267: '=' : conversion from 'size_t' to 'CoinBigIndex', possible loss of data
...
ClpModel.cpp
c:\cygwin\home\magala\COIN\Clp\ClpModel.cpp(2896) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
ClpGubDynamicMatrix.cpp
c:\cygwin\home\magala\COIN\Clp\ClpGubDynamicMatrix.cpp(112) : warning C4244: '=' : conversion from 'const double' to 'float', possible loss of data
ClpDynamicMatrix.cpp
c:\cygwin\home\magala\COIN\Clp\ClpDynamicMatrix.cpp(182) : warning C4244: '=' : conversion from 'const double' to 'float', possible loss of data
ClpDynamicExampleMatrix.cpp
c:\cygwin\home\magala\COIN\Clp\ClpDynamicExampleMatrix.cpp(126) : warning C4244: '=' : conversion from 'const double' to 'float', possible loss of data
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
OsiSolverInterface.cpp
c:\cygwin\home\magala\COIN\Osi\OsiSolverInterface.cpp(158) : warning C4244: 'initializing' : conversion from '__w64 int' to 'const int', possible loss of data
OsiCuts.cpp
c:\cygwin\home\magala\COIN\Osi\OsiCuts.cpp(78) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
c:\cygwin\home\magala\COIN\Osi\OsiCuts.cpp(82) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data
OsiClpSolverInterface.cpp
c:\cygwin\home\magala\COIN\Clp\include\ClpPresolve.hpp(127) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
c:\cygwin\home\magala\COIN\Osi\OsiClp\OsiClpSolverInterface.cpp(2840) : warning C4244: 'initializing' : conversion from '__w64 int' to 'const int', possible loss of data
CbcModel.cpp
c:\cygwin\home\magala\COIN\Cbc\include\CbcTree.hpp(59) : warning C4267: 'return' : conversion from 'size_t' to 'int', possible loss of data
c:\cygwin\home\magala\COIN\Cbc\CbcModel.cpp(4083) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
c:\cygwin\home\magala\COIN\Cbc\CbcModel.cpp(6468) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
c:\cygwin\home\magala\COIN\Cbc\CbcModel.cpp(6500) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
CbcFathomDynamicProgramming.cpp
c:\cygwin\home\magala\COIN\Cbc\CbcFathomDynamicProgramming.cpp(483) : warning C4244: 'initializing' : conversion from 'double' to 'float', possible loss of data
c:\cygwin\home\magala\COIN\Cbc\CbcFathomDynamicProgramming.cpp(557) : warning C4244: '+=' : conversion from 'double' to 'float', possible loss of data
c:\cygwin\home\magala\COIN\Cbc\CbcFathomDynamicProgramming.cpp(583) : warning C4244: '=' : conversion from 'const double' to 'float', possible loss of data
c:\cygwin\home\magala\COIN\Cbc\CbcFathomDynamicProgramming.cpp(831) : warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
CbcHeuristic.cpp
c:\cygwin\home\magala\COIN\Cbc\CbcHeuristic.cpp(555) : warning C4800: 'const char' : forcing value to bool 'true' or 'false' (performance warning)
CbcMessage.cpp
c:\cygwin\home\magala\COIN\Cbc\CbcMessage.cpp(79) : warning C4065: switch statement contains 'default' but no 'case' labels
CbcHeuristicLocal.cpp
CbcHeuristicGreedy.cpp
CbcEventHandler.cpp
CbcTreeLocal.cpp
c:\cygwin\home\magala\COIN\Cbc\include\CbcTree.hpp(59) : warning C4267: 'return' : conversion from 'size_t' to 'int', possible loss of data
CbcCutGenerator.cpp
CbcBranchCut.cpp
CbcCompareActual.cpp
c:\cygwin\home\magala\COIN\Cbc\include\CbcTree.hpp(59) : warning C4267: 'return' : conversion from 'size_t' to 'int', possible loss of data
Cbc_C_Interface.cpp
c:\cygwin\home\magala\COIN\Cbc\Cbc_C_Interface.cpp(1465) : warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning)
CbcStatistics.cpp
CbcTree.cpp
c:\cygwin\home\magala\COIN\Cbc\include\CbcTree.hpp(59) : warning C4267: 'return' : conversion from 'size_t' to 'int', possible loss of data
c:\cygwin\home\magala\COIN\Cbc\CbcTree.cpp(87) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
c:\cygwin\home\magala\COIN\Cbc\CbcTree.cpp(211) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss o
> -----Original Message-----
> From: coin-discuss-bounces at list.coin-or.org
> [mailto:coin-discuss-bounces at list.coin-or.org] On Behalf Of
> Matthew Galati
> Sent: Sunday, May 21, 2006 2:26 PM
> To: Discussions about open source software for Operations Research
> Subject: RE: [Coin-discuss] exception specifications
>
> Two more:
>
> c:\cygwin\home\magala\COIN\Osi\include\OsiCuts.hpp(346) :
> warning C4267: 'return' : conversion from 'size_t' to 'int',
> possible loss of data
> c:\cygwin\home\magala\COIN\Osi\include\OsiCuts.hpp(347) :
> warning C4267: 'return' : conversion from 'size_t' to 'int',
> possible loss of data
>
>
>
>
> > -----Original Message-----
> > From: coin-discuss-bounces at list.coin-or.org
> > [mailto:coin-discuss-bounces at list.coin-or.org] On Behalf Of Matthew
> > Galati
> > Sent: Sunday, May 21, 2006 2:13 PM
> > To: Discussions about open source software for Operations Research
> > Subject: RE: [Coin-discuss] exception specifications
> >
> > Other warnings that keep popping up in VS.net2003:
> >
> > c:\cygwin\home\magala\COIN\Coin\include\CoinHelperFunctions.hp
> > p(690) : warning C4267: 'argument' : conversion from 'size_t'
> > to 'int', possible loss of data
> >
> > c:\cygwin\home\magala\COIN\Coin\include\CoinSort.hpp(404) :
> > warning C4267: 'initializing' : conversion from 'size_t' to 'const
> > int', possible loss of data
> >
> > c:\cygwin\home\magala\COIN\Coin\include\CoinPackedVector.hpp(2
> > 29) : see reference to function template instantiation 'void
> > CoinSort_3<int,int,double,CoinFirstLess_3<S,T,U>>(S *,S *,T *,U
> > *,const CoinCompare3 &)' being compiled
> > with
> > [
> > S=int,
> > T=int,
> > U=double,
> > CoinCompare3=CoinFirstLess_3<int,int,double>
> > ]
> >
> > Matt
> >
> >
> > > -----Original Message-----
> > > From: coin-discuss-bounces at list.coin-or.org
> > > [mailto:coin-discuss-bounces at list.coin-or.org] On Behalf
> Of Laszlo
> > > Ladanyi
> > > Sent: Sunday, March 05, 2006 3:05 PM
> > > To: Discussions about open source software for Operations Research
> > > Subject: Re: [Coin-discuss] exception specifications
> > >
> > > Hi Matt,
> > >
> > > I looked at the page Matt pointed to (and searched a bit
> elsewhere,
> > > too), and the reasons for NOT to have exception
> > specification in the
> > > code is fairly compelling. I propose to remove them all.
> > According to
> > > the docs I found this should not break the compilation of
> > any existing
> > > code relying on COIN code.
> > > Could people verify this? If really nothing breaks and
> > noone comes up
> > > with other reasons for having the exception specifications
> > then I'll
> > > remove then at the end of March.
> > >
> > > --Laci
> > >
> > > On Sun, 5 Mar 2006, Matthew Galati wrote:
> > >
> > > > Hi,
> > > >
> > > > Is there a good reason to have an exception specification
> > > in the prototypes? As I understand it, if you miss an exception
> > > specification, this can cause run-time errors that should
> otherwise
> > > work fine. Identifying exceptions (for the sake of the user) can
> > > simply be done with documentation (comments), rather than in the
> > > prototype.
> > > >
> > > > This seems to be a debatable topic, but I somewhat agree
> > > with the views on this webpage:
> > > > http://www.codeproject.com/cpp/stdexceptionspec.asp
> > > >
> > > > I don't feel strongly either way, but I do want to clean up
> > > my VS.net builds (I get several hundred of these):
> > > >
> > > c:\cygwin\home\magala\COIN\Coin\include\CoinPackedVectorBase.h
> > > pp(66) :
> > > > warning C4290: C++ exception specification ignored except
> > > to indicate
> > > > a function is not __declspec(nothrow)
> > > >
> > > c:\cygwin\home\magala\COIN\Coin\include\CoinPackedVectorBase.h
> > > pp(74) :
> > > > warning C4290: C++ exception specification ignored except
> > > to indicate
> > > > a function is not __declspec(nothrow)
> > > >
> > > > If we feel strongly that exception specifications are
> > > necessary, can we at least add a pragma to turn off
> > compiler warnings?
> > > >
> > > > Thanks,
> > > > Matt
> > > >
> > > >
> > > > Matthew Galati - Optimization Developer SAS Institute -
> > Analytical
> > > > Solutions Phone 919-531-0332, R5327
> > > > Fax 919-677-4444
> > > > http://coral.ie.lehigh.edu/~magh
> > > > http://ordlnx2.na.sas.com/projects/OptWiki
> > > > http://www.sas.com/technologies/analytics/optimization/
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > Coin-discuss mailing list
> > > > Coin-discuss at list.coin-or.org
> > > > http://list.coin-or.org/mailman/listinfo/coin-discuss
> > > >
> > >
> > > _______________________________________________
> > > Coin-discuss mailing list
> > > Coin-discuss at list.coin-or.org
> > > http://list.coin-or.org/mailman/listinfo/coin-discuss
> > >
> >
> > _______________________________________________
> > Coin-discuss mailing list
> > Coin-discuss at list.coin-or.org
> > http://list.coin-or.org/mailman/listinfo/coin-discuss
> >
>
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-discuss
>
More information about the Coin-discuss
mailing list