1 /* $NetBSD: msg_153.c,v 1.7 2023/03/28 14:44:35 rillig Exp $ */ 2 # 3 "msg_153.c" 3 4 // Test for message: converting '%s' to incompatible '%s' for argument %d [153] 5 6 /* lint1-extra-flags: -X 351 */ 7 8 9 typedef double (*unary_operator)(double); 10 11 void sink_function_pointer(unary_operator); 12 void sink_int_pointer(int *); 13 14 void 15 to_function_pointer(int *x) 16 { 17 /* expect+1: warning: converting 'pointer to int' to incompatible 'pointer to function(double) returning double' for argument 1 [153] */ 18 sink_function_pointer(x); 19 } 20 21 void 22 to_int_pointer(unary_operator op) 23 { 24 /* expect+1: warning: converting 'pointer to function(double) returning double' to incompatible 'pointer to int' for argument 1 [153] */ 25 sink_int_pointer(op); 26 } 27