1 // RUN: %clang_cc1 -fsyntax-only %s -Wincompatible-function-pointer-types-strict -verify=soft,strict
2 // RUN: %clang_cc1 -fsyntax-only %s -Werror=incompatible-function-pointer-types-strict -verify=hard,strict
3 // RUN: %clang_cc1 -fsyntax-only %s -Wincompatible-function-pointer-types -verify=nonstrict
4 // nonstrict-no-diagnostics
7 typedef enum E (*fn_a_t
)(void);
8 typedef void (*fn_b_t
)(void);
10 int a(void) { return 0; }
11 void __attribute__((noreturn
)) b(void) { while (1); }
13 void fa(fn_a_t x
) {} // strict-note {{passing argument to parameter 'x' here}}
17 fa(&a
); // soft-warning {{incompatible function pointer types passing 'int (*)(void)' to parameter of type 'fn_a_t' (aka 'enum E (*)(void)')}} \
18 hard
-error
{{incompatible function pointer types passing
'int (*)(void)' to parameter of type
'fn_a_t' (aka
'enum E (*)(void)')}}