gcc/testsuite/c-c++-common/pr68833-2.c
raw| 1 | /* PR c/68833 */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-Werror=missing-format-attribute" } */ |
| 4 | |
| 5 | #include <stdarg.h> |
| 6 | |
| 7 | void |
| 8 | foo (const char *fmt, ...) |
| 9 | { |
| 10 | va_list ap; |
| 11 | va_start (ap, fmt); |
| 12 | __builtin_vprintf (fmt, ap); /* { dg-error "candidate" "printf attribute warning" } */ |
| 13 | va_end (ap); |
| 14 | } |
| 15 | |
| 16 | /* { dg-prune-output "treated as errors" } */ |