msg_229.c revision 1.7
1/* $NetBSD: msg_229.c,v 1.7 2023/07/07 19:45:22 rillig Exp $ */ 2# 3 "msg_229.c" 3 4// Test for message: converting '%s' to '%s' is questionable [229] 5 6/* lint1-extra-flags: -X 351 */ 7 8typedef double (*unary_operator)(double); 9 10int * 11to_int_pointer(unary_operator op) 12{ 13 /* expect+1: warning: converting 'pointer to function(double) returning double' to 'pointer to int' is questionable [229] */ 14 return (int *)op; 15} 16 17unary_operator 18to_function_pointer(int *p) 19{ 20 /* expect+1: warning: converting 'pointer to int' to 'pointer to function(double) returning double' is questionable [229] */ 21 return (unary_operator)p; 22} 23