[test] [ctime] Ignore -Wformat-zero-length warnings
Explicitly disable the -Wformat-zero-length diagnostic when running
ctime tests, since one of the test cases passes zero-length format
string to strftime(). When strftime() is appropriately decorated
with __attribute__(format, ...), this caused the test to fail because
of this warning (e.g. on NetBSD).
Differential Revision: https://reviews.llvm.org/D55661
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@349294 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/std/utilities/time/date.time/ctime.pass.cpp b/test/std/utilities/time/date.time/ctime.pass.cpp
index cd1f32b..f6dd75d 100644
--- a/test/std/utilities/time/date.time/ctime.pass.cpp
+++ b/test/std/utilities/time/date.time/ctime.pass.cpp
@@ -26,6 +26,10 @@
#endif
#endif
+#if defined(__GNUC__)
+#pragma GCC diagnostic ignored "-Wformat-zero-length"
+#endif
+
int main()
{
std::clock_t c = 0;