aboutsummaryrefslogtreecommitdiffstats
path: root/test/noeffect.awk
blob: 107ccbe52b78a3deb9fca802ac8f8ed20d8b86f7 (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
BEGIN {
	s == "hello, world";
	s + 1
	;;
	"s" 1
	"a"
	42
	q = 42
	q

	a = b = 42

	a * b
	a != b
	# the following should not produce warnings
	a++ == a--
	f_without_side_effect(a);
	f_with_side_effect(b) == 2
	1 == 2 && a++
	1 == 1 || b--
	a = a
	a *= 1
	a += 0
	a*a < 0 && b = 1001
}

function f_without_side_effect(x) { }
function f_with_side_effect(x) { }