1 /* Test warnings for missing format attributes on function pointers. */
2 /* Origin: Kaveh Ghazi <ghazi@caip.rutgers.edu> */
3 /* { dg-do compile { target { *-*-mingw* } } } */
4 /* { dg-options "-std=gnu99 -Wmissing-format-attribute" } */
6 #define USE_SYSTEM_FORMATS
9 typedef void (*noattr_t
) (const char *, ...);
10 typedef noattr_t
__attribute__ ((__format__(__ms_printf__
, 1, 2))) attr_t
;
12 typedef void (*vnoattr_t
) (const char *, va_list);
13 typedef vnoattr_t
__attribute__ ((__format__(__ms_printf__
, 1, 0))) vattr_t
;
16 foo1 (noattr_t na
, attr_t a
, vnoattr_t vna
, vattr_t va
)
25 na2
= a
; /* { dg-warning "candidate" "assignment warning" } */
30 vna2
= va
; /* { dg-warning "candidate" "assignment warning" } */