1/* $NetBSD: msg_107.c,v 1.7 2024/01/07 21:19:42 rillig Exp $ */ 2# 3 "msg_107.c" 3 4// Test for message: operands of '%s' have incompatible types '%s' and '%s' [107] 5 6/* lint1-extra-flags: -X 351 */ 7 8/* ARGSUSED */ 9void 10compare(double d, void *ptr) 11{ 12 /* expect+1: error: operands of '==' have incompatible types 'double' and 'pointer to void' [107] */ 13 return d == ptr; 14} 15 16static inline void 17typeok_minus(const char *p, int i, double d) 18{ 19 if (p[i] != p[(int)d]) 20 return; 21 /* expect+1: error: operands of '-' have incompatible types 'pointer to const char' and 'double' [107] */ 22 return (p - i) - (p - d); 23} 24