Home | History | Annotate | Line # | Download | only in lint1
msg_030.c revision 1.3
      1 /*	$NetBSD: msg_030.c,v 1.3 2022/04/05 23:09:19 rillig Exp $	*/
      2 # 3 "msg_030.c"
      3 
      4 /* Test for message: redeclaration of %s; ANSI C requires static [30] */
      5 
      6 /* lint1-flags: -sw */
      7 
      8 static a;
      9 /* expect+1: warning: redeclaration of a; ANSI C requires static [30] */
     10 int a;
     11 
     12 static b;
     13 /* expect+1: warning: redeclaration of b; ANSI C requires static [30] */
     14 int b = 1;
     15 
     16 static c = 1;
     17 /* expect+1: warning: redeclaration of c; ANSI C requires static [30] */
     18 int c;
     19 
     20 void
     21 use_variables(void)
     22 {
     23 	c = a + b + c;
     24 }
     25