msg_153.c revision 1.7
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 9typedef double (*unary_operator)(double); 10 11void sink_function_pointer(unary_operator); 12void sink_int_pointer(int *); 13 14void 15to_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 21void 22to_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