qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PULL v3 00/53] Misc changes for 2017-01-12


From: Peter Maydell
Subject: Re: [Qemu-devel] [PULL v3 00/53] Misc changes for 2017-01-12
Date: Tue, 16 Jan 2018 14:02:57 +0000

On 16 January 2018 at 13:50, Marc-André Lureau
<address@hidden> wrote:
> Interesting, looks like a bug in gcc ubsan that doesn't happen with
> recent versions (related to
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80550 but probably a
> different bug). Adding a cast is enough:
>
> -#define FIMD_WINCON_BUF2_STAT       ((0 << 21) | (1 << 31))
> +#define FIMD_WINCON_BUF2_STAT       (uint32_t)((0 << 21) | (1 << 31))
>
> It looks like there are no other cases like this

Rather than casting it's probably simpler to use "1U" to get that shift
to be the right type.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]