On 16 January 2018 at 13:50, Marc-André Lureau <marcandre.lur...@gmail.com> 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