lkml.org 
[lkml]   [2018]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@thinkpad /tmp $ cat sparse.c
> enum { sparse_does_not_like_this = 0x8000000000000003ULL };
> zx2c4@thinkpad /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

\
 
 \ /
  Last update: 2018-10-26 11:01    [W:0.087 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site