
On Fri, Aug 20, 2010 at 5:13 PM, Robert Ramey <ramey@rrsd.com> wrote:
Emil Dotchevski wrote:
On Fri, Aug 20, 2010 at 1:02 PM, Robert Ramey <ramey@rrsd.com> wrote:
Jeff Flinn wrote:
By the way Robert, thanks for clearing up all of the compiler warnings in both the lib and in portable_binary_archive over the last couple of releases.
I'm glad you appreciate this. I caused an unintended ripple effect which resulted in much agony - which is likely not over..
advice to prospective library developer's - use warning level 4 it's cheaper in the long run.
#pragma warning(push,1) on MSVC, and #pragma gcc system_header are cheaper.
hmmm - please expand upon this.
I'm not sure if this is a good idea in general but I'm using this in Boost Exception and I'm not aware of any problems it causes. I have #if defined(__GNUC__) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma GCC system_header #endif #if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS) #pragma warning(push,1) #endif at the top of the header files (and the matching pop for MSVC at the end of the file), so when I build the code I can use whatever warning level is comfortable for me (combined with #define BOOST_EXCEPTION_ENABLE_WARNINGS), while everyone else doesn't see any warnings (I hope.) Of course that is a moot point if you like warning level 4 or the --pedantic stuff in GCC, but I find it very difficult to justify many of the things (for example, casts) people normally do to work around warnings. Emil Dotchevski Reverge Studios, Inc. http://www.revergestudios.com/reblog/index.php?n=ReCode