1#define __noreturn __attribute__((__noreturn__)) 2 3void set_die(void (*)(void)); 4void set_die_nr(__noreturn void (*)(void)); 5 6void die(void); 7void __noreturn die_nr(void); 8 9static void foo(void) 10{ 11 set_die(die); 12 set_die(die_nr); 13 set_die_nr(die_nr); 14 set_die_nr(die); 15 16 void (*fptr0)(void) = die; 17 void (*fptr1)(void) = die_nr; 18 __noreturn void (*fptr3)(void) = die_nr; 19 __noreturn void (*fptr2)(void) = die; 20} 21 22/* 23 * check-name: function-attribute-pointer 24 * 25 * check-error-start 26function-attribute-pointer.c:14:20: warning: incorrect type in argument 1 (different modifiers) 27function-attribute-pointer.c:14:20: expected void ( [noreturn] * )( ... ) 28function-attribute-pointer.c:14:20: got void ( * )( ... ) 29function-attribute-pointer.c:19:42: warning: incorrect type in initializer (different modifiers) 30function-attribute-pointer.c:19:42: expected void ( [noreturn] *fptr2 )( ... ) 31function-attribute-pointer.c:19:42: got void ( * )( ... ) 32 * check-error-end 33 */ 34