xref: /netbsd-src/tests/usr.bin/xlint/lint1/msg_086.c (revision 7d62b00eb9ad855ffcd7da46b41e23feb5476fac)
1 /*	$NetBSD: msg_086.c,v 1.5 2022/06/20 21:13:36 rillig Exp $	*/
2 # 3 "msg_086.c"
3 
4 // Test for message: automatic '%s' hides external declaration [86]
5 
6 /* lint1-flags: -S -g -h -w */
7 
8 extern int identifier;
9 
10 int
11 local_auto(void)
12 {
13 	/* expect+1: warning: automatic 'identifier' hides external declaration [86] */
14 	int identifier = 3;
15 	return identifier;
16 }
17 
18 /* XXX: the function argument does not trigger the warning. */
19 int
20 arg_auto(int identifier)
21 {
22 	return identifier;
23 }
24