Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp516001ima; Fri, 26 Oct 2018 02:02:35 -0700 (PDT) X-Google-Smtp-Source: AJdET5cM1rcVW5ozFTOFZd+/9nw02sOc+HaycOQWXbq+idrmSqfjSIxdzJoyrj6FP+SMKusTU8a0 X-Received: by 2002:a17:902:ea:: with SMTP id a97-v6mr2692394pla.164.1540544555900; Fri, 26 Oct 2018 02:02:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540544555; cv=none; d=google.com; s=arc-20160816; b=MivO203w76UgwuS28qvkWZxrXYp9C64YAZ2hYqXYLuTsHuDPMh0NBAE5UiWxkopfOJ kVd52jzSu+ErDDN4G+8glWdRaOe5WAI+0hS0+tcSJ9Q4RZ9597jCcgttjYO9HXzAA64q zrTzCwbSqz95w0w2zymNzsCq8B5dmXqMLwKcRZUGHuh6kPioocGVKD7nrwYQ6oM0PlkB dKpYSVUK7GXVumRU4ZHATXpGFk8UYMOfuyroF5o4hU5wHZPd/rNIws+eRDViM9VWT5i4 5eVl2W5D9QYmzkaaxuV5GXARh11xAmIIR4ue6yIYL8aH2CM4WGnskxmfkE92fOufJCnz OiZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=xqwwDdD+iaVKc6Q+WDBr37969mL+58DAgoioZwt5vEI=; b=RWPY3RJS9TXTISZFgGTaUsllBjJmuWR9U48AkRJqqhMk0Ib2YZuh927MuintmHgwBl ypDgfRBtk9vAfkpi+5BU6ykh+pPSB8MEuVsbN8RLw2Bvl68T8HuT5H0Nc/mKP3WsHO3n SsafCFFpLcPpGLS8zam/IPx0vINTmCLLJICsPOvC6SL2WGrEXgpsEhtWVNcMVHpbgei1 uq6z/1P7bQKf4cupGmjHpDBrqzLFddyMD7abVarEFFuwaxewaIIvHKBTEjJj8RjGm6Li 9FSQLqHjx2a4sRz7UlyKbQVN2y10e59Uj3xAJuX5Y5L0vlEtM9R26vgS/j7cjiZAD3Zr /7BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FN99HlcT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j5-v6si11129427pgk.85.2018.10.26.02.02.18; Fri, 26 Oct 2018 02:02:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FN99HlcT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727377AbeJZRhz (ORCPT + 99 others); Fri, 26 Oct 2018 13:37:55 -0400 Received: from mail-ed1-f65.google.com ([209.85.208.65]:44814 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726014AbeJZRhz (ORCPT ); Fri, 26 Oct 2018 13:37:55 -0400 Received: by mail-ed1-f65.google.com with SMTP id z21-v6so603450edb.11; Fri, 26 Oct 2018 02:01:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=xqwwDdD+iaVKc6Q+WDBr37969mL+58DAgoioZwt5vEI=; b=FN99HlcTwmShfmX2drFnkXiVmsgyDkEthIaduU5ywnXyADu1i8t9tNUEldS4I/Sf7C HlQnY3bkda2R/A1NPL8U4ir+cyG0tGwV5OcBcGP6ompD7xPm1iSGDDNPeYUxd0DjM77Z EVWAw6xwv6I7vC2snehi5lpu3SqzMOoKLMCQN1XkcPPqph9E4IFmg1yxR4/H6XF1/lgv nACrdI+aSg5Ccm6eSEKKFQtpujei0DvH4wZqEu6n5pWRCdCoFBdGHdFoCz6H81AX61dH O/MDfNNjRCUL9UgU6Z8HpJusNk5WNOmQgZwNtSI1RFokTFlRrtV7VZvaIe/TYT0IQmrJ 9dYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=xqwwDdD+iaVKc6Q+WDBr37969mL+58DAgoioZwt5vEI=; b=DneK3HA2ANI688WpEimC3KRq6VClMJorf5sf16+PB2EAD/FyRCR/p6mAMw5AkQG5GH tkaveMXmeSkAbmYPZiNbElIAnVU+mNNQY6uZdZaegp4S2Qbhbeftq6deYou6o7ufS2kn Q9lc1lfoE4SFXDF2x/WJLGm5/ctTWQZsGOMuQDornrxocM0s4MLKIObcj/Znao6EDQqR clOme8lDntXNRyJyA0zjNUlShpwnRLl/DixsSN6qTHSa5avvCWCIRXPUChInbvOuzhzE X3+hF9+rlPU4nNobcKjQh0MC/hUR0tZ6/NRWjdL9QuzI//dd6Nk7HjtUNWTe8DAGWFRl z86Q== X-Gm-Message-State: AGRZ1gK2SrHxQ7xR4EDSbJ/OnT/hteArCZflKbXbYQI4A83Z3A15VXS8 FZ5NipB+T1YjaoyRWbmyOMEMBw/j X-Received: by 2002:a17:906:74d7:: with SMTP id z23-v6mr1856458ejl.234.1540544500168; Fri, 26 Oct 2018 02:01:40 -0700 (PDT) Received: from ltop.local ([2a02:a03f:407f:2200:200d:b9a4:6a0c:ace2]) by smtp.gmail.com with ESMTPSA id l52-v6sm3916047edc.10.2018.10.26.02.01.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Oct 2018 02:01:39 -0700 (PDT) Date: Fri, 26 Oct 2018 11:01:37 +0200 From: Luc Van Oostenryck To: "Jason A. Donenfeld" Cc: linux-sparse@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH sparse] parse: shifting by full number of bits is undefined Message-ID: <20181026090136.2fidq6kicv4szwjd@ltop.local> References: <20181026031700.12310-1-Jason@zx2c4.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181026031700.12310-1-Jason@zx2c4.com> User-Agent: NeoMutt/20180622 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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