testsuite: Skip analyzer tests on AIX.
[official-gcc.git] / gcc / testsuite / c-c++-common / Wsuggest-attribute-1.c
blob8b5b398fb78d74e8b49299109c15524b381d3022
1 /* PR c/98487 */
2 /* { dg-do compile { target { c || c++11 } } } */
3 /* { dg-options "-Wsuggest-attribute=format" } */
5 #include <stdarg.h>
7 [[gnu::__format__(__printf__, 1, 2)]]
8 void
9 do_printf(const char * const a0, ...)
11 va_list ap;
12 va_start(ap, a0);
13 __builtin_vprintf(a0, ap);
14 va_end(ap);
17 [[gnu::__format__(__scanf__, 1, 2)]]
18 void
19 do_scanf(const char * const a0, ...)
21 va_list ap;
22 va_start(ap, a0);
23 __builtin_vscanf(a0, ap);
24 va_end(ap);
27 struct tm;
29 [[gnu::__format__(__strftime__, 1, 0)]]
30 void
31 do_strftime(const char * const a0, struct tm * a1)
33 char buff[256];
34 __builtin_strftime(buff, sizeof(buff), a0, a1);
35 __builtin_puts(buff);