summaryrefslogtreecommitdiff
path: root/test/std/depr/depr.c.headers/stdio_h.pass.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-07-23 20:47:26 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-07-23 20:47:26 +0000
commit51072bd6bf79ef2bc6a922079bff57c31c1effbc (patch)
tree91a2effbc9e6f80bdbbf9eb70e06c51ad0867ea0 /test/std/depr/depr.c.headers/stdio_h.pass.cpp
parentbb5e33f003797b67974a8893f7f2930fc51b8210 (diff)
Notes
Diffstat (limited to 'test/std/depr/depr.c.headers/stdio_h.pass.cpp')
-rw-r--r--test/std/depr/depr.c.headers/stdio_h.pass.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/std/depr/depr.c.headers/stdio_h.pass.cpp b/test/std/depr/depr.c.headers/stdio_h.pass.cpp
index 3c5dd0ebf0e0..85f9d2986284 100644
--- a/test/std/depr/depr.c.headers/stdio_h.pass.cpp
+++ b/test/std/depr/depr.c.headers/stdio_h.pass.cpp
@@ -99,17 +99,25 @@
#include <cstdarg>
+#if defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wformat-zero-length"
#pragma GCC diagnostic ignored "-Wdeprecated-declarations" // for tmpnam
+#endif
int main()
{
FILE* fp = 0;
- fpos_t fpos = {0};
- size_t s = 0; ((void)s);
+ fpos_t fpos = {};
+ size_t s = 0;
char* cp = 0;
char arr[] = {'a', 'b'};
va_list va;
+ ((void)fp); // Prevent unused warning
+ ((void)fpos); // Prevent unused warning
+ ((void)s); // Prevent unused warning
+ ((void)cp); // Prevent unused warning
+ ((void)arr); // Prevent unused warning
+ ((void)va); // Prevent unused warning
static_assert((std::is_same<decltype(remove("")), int>::value), "");
static_assert((std::is_same<decltype(rename("","")), int>::value), "");
static_assert((std::is_same<decltype(tmpfile()), FILE*>::value), "");