blob: 69b05289da74c86e057638e463c787337433dcc8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
/* $NetBSD: msg_030.c,v 1.7 2023/07/07 19:45:22 rillig Exp $ */
# 3 "msg_030.c"
/* Test for message: redeclaration of '%s'; ANSI C requires static [30] */
/* lint1-flags: -sw -X 351 */
/* expect+1: error: old-style declaration; add 'int' [1] */
static a;
/* expect+1: warning: redeclaration of 'a'; ANSI C requires static [30] */
int a;
/* expect+1: error: old-style declaration; add 'int' [1] */
static b;
/* expect+1: warning: redeclaration of 'b'; ANSI C requires static [30] */
int b = 1;
/* expect+1: error: old-style declaration; add 'int' [1] */
static c = 1;
/* expect+1: warning: redeclaration of 'c'; ANSI C requires static [30] */
int c;
void
use_variables(void)
{
c = a + b + c;
}
|