Login  Register

disabling compilation warnings

Posted by DU VIGNAUD DE VILLEFORT FRANCOIS GASAPRD PHI on May 25, 2007; 11:56am
URL: http://quantlib.414.s1.nabble.com/disabling-compilation-warnings-tp9510.html

Hi all,

 

I have just disabled the compilation warning #4224 for VC2005 by adding the corresponding preprocessor command in ql/config.msvc.hpp. I’m wondering if disabling uncommon compilation warning at a more local level would‘nt be more appropriated. Indeed changing a line in ql/config.msvc.hpp trigger the whole recompilation of QL, and increase the size of a file which will be read hundred of times. For example the compilation warning #4180 which appears only during matrix.cpp compilation could be disabled the following way:

 

 

#if defined (BOOST_MSVC)

#pragma warning (disable: 4180)

#endif

 

#include <boost/numeric/ublas/triangular.hpp>

#include <boost/numeric/ublas/lu.hpp>

 

#if defined (BOOST_MSVC)

#pragma warning (default: 4180)

#endif

 

 

Since the compilation warning #4224 appear every time boost/function.hpp is included (9 times in QL) we might define some handy macros somewhere:

 

#define QL_SAFE_BOOST_FUNCTION_INCLUDE \

#if defined (BOOST_MSVC) \

#pragma warning (disable: 4224) \

#endif \

#include <boost/function.hpp> \

#if defined (BOOST_MSVC) \

#pragma warning (default: 4224) \

#endif \

 

any thoughts ?

François


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev