diff --git a/autotest/cpp/gtest_include.h b/autotest/cpp/gtest_include.h index 2ba176edbdbe..836af6c9cd0c 100644 --- a/autotest/cpp/gtest_include.h +++ b/autotest/cpp/gtest_include.h @@ -17,4 +17,14 @@ #pragma GCC system_header #endif +#if defined(__GNUC__) +// Workaround https://github.com/google/googletest/issues/4701 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wcpp" +#endif + #include "gtest/gtest.h" + +#if defined(__GNUC__) +#pragma GCC diagnostic pop +#endif