1 /* Test for warnings for missing format attributes. */
2 /* Origin: Joseph Myers <jsm28@cam.ac.uk> */
3 /* { dg-do compile } */
4 /* { dg-options "-std=gnu99 -Wmissing-format-attribute" } */
9 foo (const char *fmt
, ...)
13 vprintf (fmt
, ap
); /* { dg-warning "candidate" "printf attribute warning" } */
18 bar (const char *fmt
, ...)
22 vscanf (fmt
, ap
); /* { dg-warning "candidate" "scanf attribute warning" } */
26 __attribute__((__format__(__printf__
, 1, 2))) void
27 foo2 (const char *fmt
, ...)
36 vfoo (const char *fmt
, va_list arg
)
38 vprintf (fmt
, arg
); /* { dg-warning "candidate" "printf attribute warning 2" } */