1 // RUN: %clang_cc1 %s -fsyntax-only -Wno-strict-prototypes -verify
4 typedef void (*Fn_noret
)(void) __attribute__((noreturn
));
5 typedef void (*Fn_ret
)(void);
7 typedef void (*Fn_noret_noproto
)() __attribute__((noreturn
));
8 typedef void (*Fn_ret_noproto
)();
11 void foo_noret(void) __attribute__((noreturn
));
14 void foo_noret_noproto() __attribute__((noreturn
));
17 Fn_noret fn2
= &foo
; // expected-warning {{incompatible function pointer types initializing 'Fn_noret'}}
18 Fn_noret fn3
= &foo_noret
;
19 Fn_ret fn4
= &foo_noret
;
22 Fn_noret_noproto fn6
= &foo_noproto
; // expected-warning {{incompatible function pointer types initializing 'Fn_noret_noproto'}}
23 Fn_noret_noproto fn7
= &foo_noret_noproto
;
24 Fn_ret_noproto fn8
= &foo_noret_noproto
;
25 Fn_ret_noproto fn9
= &foo_noproto
;