summaryrefslogtreecommitdiff
path: root/tests/usr.bin/xlint/lint1/msg_010.c
blob: fe576342f5789c3e2de43337eea6f22f116f2be5 (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*	$NetBSD: msg_010.c,v 1.6 2023/03/28 14:44:34 rillig Exp $	*/
# 3 "msg_010.c"

// Test for message: duplicate '%s' [10]

/* lint1-extra-flags: -X 351 */

/* expect+1: warning: duplicate 'inline' [10] */
inline inline void
double_inline(void)
{
}

/* expect+1: warning: duplicate 'const' [10] */
const const int
double_const(void)
{
	return 0;
}

/* expect+1: warning: duplicate 'volatile' [10] */
volatile volatile int
double_volatile(void)
{
	return 0;
}

int
restrict_pointer(const int *restrict p)
{
	return *p;
}

_Thread_local int thread_local_int;
_Thread_local int *pointer_to_thread_local;

int
thread_local_parameter(_Thread_local int i) /* caught by the compiler */
{
	return i;
}