xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_104.c (revision e6298b924c5ba98f3a22919b56dab04a87cdbb1c)
1*e6298b92Srillig /*	$NetBSD: msg_104.c,v 1.5 2023/07/07 19:45:22 rillig Exp $	*/
2a0a15c14Srillig # 3 "msg_104.c"
3a0a15c14Srillig 
48b62008aSrillig // Test for message: left operand of '->' must be pointer to struct or union, not '%s' [104]
5a0a15c14Srillig 
6*e6298b92Srillig /* lint1-extra-flags: -X 351 */
7*e6298b92Srillig 
88b62008aSrillig struct point {
98b62008aSrillig 	int x, y;
108b62008aSrillig };
118b62008aSrillig 
128b62008aSrillig /* ARGSUSED */
138b62008aSrillig void
test(struct point pt,struct point * ptr)148b62008aSrillig test(struct point pt, struct point *ptr)
158b62008aSrillig {
16c83f7defSrillig 	/* expect+1: error: left operand of '->' must be pointer to struct or union, not 'struct point' [104] */
178b62008aSrillig 	pt->x = 0;
188b62008aSrillig 	ptr->y = 0;
198b62008aSrillig }
20