File: merged

package info (click to toggle)
tcng 10b-4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 3,644 kB
  • sloc: ansic: 19,040; pascal: 4,640; yacc: 2,619; sh: 1,914; perl: 1,546; lex: 772; makefile: 751
file content (78 lines) | stat: -rw-r--r-- 1,671 bytes parent folder | download | duplicates (5)
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# merged class cannot be referenced by variables ------------------------------
tcc -xif:err 2>&1
egress {
    $c = class { fifo; }
    class (<>) if raw[0] == 1;
    class $c if 1;
}
EOF
ERROR
<stdin>:2: warning: class for shared qdisc should be implicit
<stdin>:2: class has been merged and cannot be referenced by a variable
# merged class cannot be selected ---------------------------------------------
tcc -xif:err 2>&1
egress {
    class 
        if raw[0] == 0 
    { 
        fifo; 
    }
    class (<>) if 1;
}
EOF
ERROR
<stdin>:3: warning: class for shared qdisc should be implicit
<stdin>:3: class has been merged and cannot be selected
# scope of merged class in variable use output --------------------------------
tcc -w -xif:err -Xx,all -c -u stderr 2>&1
egress {
    class (<>) {
        $x = 3.25;
    }
    class {
        $x = 3.85;
        fifo;
    }
}   
EOF
{ device eth0
{ qdisc eth0:1
{ class eth0:1:0
$x = 3.25000
}
{ class eth0:1:unnumbered
$x = 3.85000
}
}
}
# warn if class of shared qdisc is explicit -----------------------------------
tcc -c 2>&1
egress {
    class {
	fifo;
    }
}
EOF
<stdin>:2: warning: class for shared qdisc should be implicit
# warn if using -Wnoexplicit --------------------------------------------------
tcc -c -Wnoexplicit 2>&1
egress {
    class {
	fifo;
    }
}
EOF
# don't warn if class of shared qdisc is implicit -----------------------------
tcc -c 2>&1
egress {
    fifo;
}
EOF
# don't warn if shared qdisc is implicit --------------------------------------
tcc -c -xif:err -Xx,fifos 2>&1
egress;
EOF
# don't warn if shared qdisc is absent ----------------------------------------
tcc -c 2>&1
egress;
EOF