xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_104.c (revision e6298b924c5ba98f3a22919b56dab04a87cdbb1c)
1 /*	$NetBSD: msg_104.c,v 1.5 2023/07/07 19:45:22 rillig Exp $	*/
2 # 3 "msg_104.c"
3 
4 // Test for message: left operand of '->' must be pointer to struct or union, not '%s' [104]
5 
6 /* lint1-extra-flags: -X 351 */
7 
8 struct point {
9 	int x, y;
10 };
11 
12 /* ARGSUSED */
13 void
test(struct point pt,struct point * ptr)14 test(struct point pt, struct point *ptr)
15 {
16 	/* expect+1: error: left operand of '->' must be pointer to struct or union, not 'struct point' [104] */
17 	pt->x = 0;
18 	ptr->y = 0;
19 }
20