[Coin-discuss] exception specifications
Matthew Galati
Matthew.Galati at sas.com
Sun May 21 14:13:07 EDT 2006
Other warnings that keep popping up in VS.net2003:
c:\cygwin\home\magala\COIN\Coin\include\CoinHelperFunctions.hpp(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(229) : 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
>
More information about the Coin-discuss
mailing list