1 // RUN: %clang_cc1 %s -fsyntax-only -Wno-strict-prototypes -verify
3 typedef void (*Fn_noret
)(void) __attribute__((noreturn
));
4 typedef void (*Fn_ret
)(void);
6 typedef void (*Fn_noret_noproto
)() __attribute__((noreturn
));
7 typedef void (*Fn_ret_noproto
)();
10 void foo_noret(void) __attribute__((noreturn
));
13 void foo_noret_noproto() __attribute__((noreturn
));
16 Fn_noret fn2
= &foo
; // expected-error {{incompatible function pointer types initializing 'Fn_noret'}}
17 Fn_noret fn3
= &foo_noret
;
18 Fn_ret fn4
= &foo_noret
;
21 Fn_noret_noproto fn6
= &foo_noproto
; // expected-error {{incompatible function pointer types initializing 'Fn_noret_noproto'}}
22 Fn_noret_noproto fn7
= &foo_noret_noproto
;
23 Fn_ret_noproto fn8
= &foo_noret_noproto
;
24 Fn_ret_noproto fn9
= &foo_noproto
;