[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20181026090136.2fidq6kicv4szwjd@ltop.local>
Date: Fri, 26 Oct 2018 11:01:37 +0200
From: Luc Van Oostenryck <luc.vanoostenryck@...il.com>
To: "Jason A. Donenfeld" <Jason@...c4.com>
Cc: linux-sparse@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH sparse] parse: shifting by full number of bits is
undefined
On Fri, Oct 26, 2018 at 05:17:00AM +0200, Jason A. Donenfeld wrote:
> The type checker wasn't identifying upper bounds for huge unsigned
> 64-bit numbers, because the right shift turned into a no-op:
>
> zx2c4@...nkpad /tmp $ cat sparse.c
> enum { sparse_does_not_like_this = 0x8000000000000003ULL };
> zx2c4@...nkpad /tmp $ sparse sparse.c
> sparse.c:1:36: warning: cast truncates bits from constant value (8000000000000003 becomes 3)
Hi Jason,
This is already fixed in the development tree:
git://github.com/lucvoo/sparse.git
together with some other fixes & changes regarding enums.
I hope to be able to push this to the official tree real soon now.
Kind regards,
-- Luc
Powered by blists - more mailing lists