summary refs log tree commit diff stats
path: root/results/scraper/launchpad/1625987
blob: ae6fc827a1289eed7a382c9df9c6084d18ff9e6e (plain) (blame)
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
target-arm/translate-a64.c:2028: possible coding error ?

target-arm/translate-a64.c:2028:37: warning: ?: using integer constants in boolean context [-Wint-in-bool-context]

Source code is

        bool iss_sf = opc == 0 ? 32 : 64;

Maybe better code

        bool iss_sf = (opc == 0) ? 32 : 64;

This is clearly a bug, but your suggested change won't deal with the problem, which is that we're trying to set a bool so the ? 32 : 64 construct is just wrong.


On 22 September 2016 at 02:53, Peter Maydell <email address hidden> wrote:
> This is clearly a bug, but your suggested change won't deal with the
> problem, which is that we're trying to set a bool so the ? 32 : 64
> construct is just wrong.

> Bug description:
>   target-arm/translate-a64.c:2028:37: warning: ?: using integer
>   constants in boolean context [-Wint-in-bool-context]
>
>   Source code is
>
>           bool iss_sf = opc == 0 ? 32 : 64;

Edgar, did you want to look at a fix for this? It was introduced
in your commit aaa1f954d4 adding syndrome info for loads and stores.

thanks
-- PMM


On Thu, Sep 29, 2016 at 06:40:53PM -0700, Peter Maydell wrote:
> On 22 September 2016 at 02:53, Peter Maydell <email address hidden> wrote:
> > This is clearly a bug, but your suggested change won't deal with the
> > problem, which is that we're trying to set a bool so the ? 32 : 64
> > construct is just wrong.
> 
> > Bug description:
> >   target-arm/translate-a64.c:2028:37: warning: ?: using integer
> >   constants in boolean context [-Wint-in-bool-context]
> >
> >   Source code is
> >
> >           bool iss_sf = opc == 0 ? 32 : 64;
> 
> Edgar, did you want to look at a fix for this? It was introduced
> in your commit aaa1f954d4 adding syndrome info for loads and stores.

Hi Peter,

Yes, I've just posted a fix to the list.
It should have been:

bool iss_sf = opc == 0 ? false : true;

Cheers,
Edgar


Now fixed in master, commit 173ff58580b383a7841.


Released with v2.8