diff --git a/ortools/sat/clause_test.cc b/ortools/sat/clause_test.cc index 6c3b0ffd46..23d084c0df 100644 --- a/ortools/sat/clause_test.cc +++ b/ortools/sat/clause_test.cc @@ -54,8 +54,14 @@ TEST(SatClauseTest, BasicAllocation) { } struct TestSatClause { +#ifdef _MSC_VER + // MSVC doesn't allow to overflow at the word boundary. + unsigned int is_learned : 1; + unsigned int is_attached : 1; +#else bool is_learned : 1; bool is_attached : 1; +#endif unsigned int size : 30; // We test that Literal literals[0]; does not increase the size.