Commit aeed1e4d authored by Justin Schuh's avatar Justin Schuh Committed by Nico Weber

Fix MSVC release build after r490852

Disable integer overflow warnings in integer overflow tests.

TBR=thakis@chromium.org

Bug: 751198
Change-Id: Ia5680199a51f0ecb951744838e624f9d6f1d7573
Reviewed-on: https://chromium-review.googlesource.com/596511Reviewed-by: default avatarJustin Schuh <jschuh@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Justin Schuh <jschuh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#491085}
parent c32fbe04
......@@ -9,6 +9,15 @@
#include <type_traits>
#include "base/compiler_specific.h"
// WARNING: This block must come before the base/numerics headers are included.
// These tests deliberately cause arithmetic boundary errors. If the compiler is
// aggressive enough, it can const detect these errors, so we disable warnings.
#if defined(OS_WIN)
#pragma warning(disable : 4756) // Arithmetic overflow.
#pragma warning(disable : 4293) // Invalid shift.
#endif
#include "base/logging.h"
#include "base/numerics/safe_conversions.h"
#include "base/numerics/safe_math.h"
......@@ -25,13 +34,6 @@ namespace internal {
using std::numeric_limits;
// These tests deliberately cause arithmetic boundary errors. If the compiler is
// aggressive enough, it can const detect these errors, so we disable warnings.
#if defined(OS_WIN)
#pragma warning(disable : 4756) // Arithmetic overflow.
#pragma warning(disable : 4293) // Invalid shift.
#endif
// This is a helper function for finding the maximum value in Src that can be
// wholy represented as the destination floating-point type.
template <typename Dst, typename Src>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment