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