Browse files

[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:
  • Loading branch information...
mgorny committed Dec 16, 2018
1 parent c20c3d2 commit c58dea983a2ad4b08de3c14577be4674b0420fcc
Showing with 4 additions and 0 deletions.
  1. +4 −0 libcxx/test/std/utilities/time/date.time/ctime.pass.cpp
@@ -26,6 +26,10 @@

#if defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wformat-zero-length"

int main()
std::clock_t c = 0;

0 comments on commit c58dea9

Please sign in to comment.