xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_260.c (revision 5d41e58a30e20fdfa075956f8b357f1c03a9e4d5)
1 /*	$NetBSD: msg_260.c,v 1.5 2022/06/11 11:52:13 rillig Exp $	*/
2 # 3 "msg_260.c"
3 
4 // Test for message: previous declaration of '%s' [260]
5 
6 /* lint1-extra-flags: -r */
7 
8 # 100 "header.h" 1
9 /* expect+1: previous declaration of 's' [260] */
10 struct s {
11     int member;
12 };
13 # 14 "msg_260.c" 2
14 
15 # 200 "header.h" 1
16 /* expect+2: error: struct tag 's' redeclared as union [46] */
17 /* expect+1: previous declaration of 's' [260] */
18 union s {
19     int member;
20 };
21 /*
22  * FIXME: the stack trace for the message 260 is wrong, as the previous
23  * declaration is included from logical line msg_260.c:8, not from
24  * msg_260.c:15.
25  */
26 # 27 "msg_260.c" 2
27 /* expect+1: error: union tag 's' redeclared as union [46] */
28 union s {
29     int member;
30 };
31 /*
32  * FIXME: the stack trace for the 260 is missing.
33  */
34