MSVC: disable warning about constant conditional expressions
authorFrank Benkstein <frank.benkstein@sap.com>
Thu, 4 Feb 2016 12:20:58 +0000 (13:20 +0100)
committerFrank Benkstein <frank.benkstein@sap.com>
Fri, 5 Feb 2016 13:56:53 +0000 (14:56 +0100)
The standard headers for Visual Studio 2008 generate a warning about
constant conditional expressions when compiled with exception support
disabled.  This is caused by the _CATCH_ALL macro in xstddef which is
defined thusly:

  #ifdef _HAS_EXCEPTIONS
  #define _CATCH_ALL } catch (...) {
  #else
  #define _CATCH_ALL } if (0) {
  #endif

configure.py

index 1c97db7..92d0573 100755 (executable)
@@ -302,6 +302,8 @@ if platform.is_msvc():
               '/WX',  # Warnings as errors.
               '/wd4530', '/wd4100', '/wd4706',
               '/wd4512', '/wd4800', '/wd4702', '/wd4819',
+              # Disable warnings about constant conditional expressions.
+              '/wd4127',
               # Disable warnings about passing "this" during initialization.
               '/wd4355',
               # Disable warnings about ignored typedef in DbgHelp.h