blob: 2a5a43482f3d892ea469ef0930bb9599ab5b6eee (
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
|
static long foo(long a, long b, long c)
{
return a? b:c;
}
static long foo_bool(_Bool a, long b, long c)
{
return a? b:c;
}
static long bar(long a, long b, long c)
{
if (a)
return b;
else
return b + c;
}
static long bar_bool(_Bool a, long b, long c)
{
if (a)
return b;
else
return b + c;
}
/*
* check-name: Non-bool condition values in branch/select
* check-command: sparsec -c $file -o tmp.o
*/
|