summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/optional/StringView.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test/Ice/optional/StringView.h')
-rw-r--r--cpp/test/Ice/optional/StringView.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/cpp/test/Ice/optional/StringView.h b/cpp/test/Ice/optional/StringView.h
index 18ac2d2bd80..29a67c201b1 100644
--- a/cpp/test/Ice/optional/StringView.h
+++ b/cpp/test/Ice/optional/StringView.h
@@ -12,6 +12,15 @@
#include <Ice/Ice.h>
+//
+// COMPILERFIX: G++ false positive "maybe-uninitialized" warnings when using
+// string_view with Ice::optional in C++17 mode.
+//
+#if defined(__GNUC__) && ICE_CPLUSPLUS >= 201703L
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+#endif
+
namespace Util
{
@@ -186,4 +195,8 @@ struct StreamHelper<Util::string_view, StreamHelperCategoryBuiltin>
}
+#if defined(__GNUC__) && ICE_CPLUSPLUS >= 201703L
+# pragma GCC diagnostic pop
+#endif
+
#endif