1 /* $NetBSD: msg_086.c,v 1.8 2024/10/14 18:43:24 rillig Exp $ */ 2 # 3 "msg_086.c" 3 4 // Test for message: automatic '%s' hides external declaration with type '%s' [86] 5 6 /* lint1-flags: -S -g -h -w -X 351 */ 7 8 extern double variable; 9 void parameter(double); 10 void err(int, const char *, ...); 11 12 int sink; 13 14 void 15 /* XXX: the function parameter does not trigger the warning. */ 16 local_(int parameter) 17 { 18 /* expect+1: warning: automatic 'variable' hides external declaration with type 'double' [86] */ 19 int variable = 3; 20 /* expect+1: warning: automatic 'err' hides external declaration with type 'function(int, pointer to const char, ...) returning void' [86] */ 21 int err = 5; 22 23 sink = variable; 24 sink = parameter; 25 sink = err; 26 } 27