From owner-freebsd-hackers@freebsd.org Thu Jan 11 12:03:43 2018 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92FBFEA4CB7 for ; Thu, 11 Jan 2018 12:03:43 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-yw0-x230.google.com (mail-yw0-x230.google.com [IPv6:2607:f8b0:4002:c05::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4EF906C449 for ; Thu, 11 Jan 2018 12:03:43 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: by mail-yw0-x230.google.com with SMTP id x62so895129ywg.11 for ; Thu, 11 Jan 2018 04:03:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:from:date:message-id:subject:to; bh=vtUwVEIB2ae516snvE4wxF0tISu+WozBNpldOZb8bWY=; b=R93Q9JvfQeJkkKCqkDNdbyEZmPB+X0Yfojndv4SGicDegRodyCf1HqR8UgMUgPI2i5 Yfff04VYPUZu5APL8bz0eK5ZWLYji/OqHr/8Cp8n1SzBRUahL7xHp1HoTg1Pik1vzc1m /ZolWAx87fYRWVXO9luwTYezXaddXq3pqJfew= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=vtUwVEIB2ae516snvE4wxF0tISu+WozBNpldOZb8bWY=; b=K+PYU7e1PCrl3kgywIOuOBowDTZ+34Toh/4uhtm7/fXFfQhyenCn/+38wu5cF5KzXn qnMpfom4jdaQJgxtsBUEt8WFSnvRTJf0/pTb0WOCRb39qrw5wJ6CLp3Pmij7FyWX5NvL OYvybivTtdw1dTDmQ5rz95fp90yBghHHgE5Niyq+vGdXcmRiVntj6RYOEbIxVMQX0RjQ /H+VeqooDPGu33TDQbUgiCOzMANBBnLPXpObLcOgSdDPpmeX5xkvdlKvtiFNTwQGhPsM Hgk1nQ2qsQspR4Oy7TK78Ezpz8WSP+H7rdUDALDeHCuWiQLBYvuC2jB6S0MVWqR/Is69 QJ7A== X-Gm-Message-State: AKwxytcHdnuCZD2T1XPWwI7tQ8N6i1q6XRuA26GD9cAfMyZe3jFRCjS+ mLrTRc1K6oICc0bWuyLA4xaWD1WH/77xSPXggIJ4ZKwD X-Google-Smtp-Source: ACJfBovMiQkh7SravDIxdAdoHCp7FhESgQ/FH2dTqLZ5h4uDIH05q5/OwgFjAX3hyN0wVGxIPl1QLyKV+b/AsE/ZpDU= X-Received: by 10.13.228.1 with SMTP id n1mr2830536ywe.6.1515672221915; Thu, 11 Jan 2018 04:03:41 -0800 (PST) MIME-Version: 1.0 Received: by 10.37.46.79 with HTTP; Thu, 11 Jan 2018 04:03:11 -0800 (PST) From: Eitan Adler Date: Thu, 11 Jan 2018 04:03:11 -0800 Message-ID: Subject: 1 << 31 redux To: FreeBSD Hackers Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jan 2018 12:03:43 -0000 Hi all, A few years ago I fixed most of the cases where we used 1 << 31 in FreeBSD. This expression is illegal in C. Since then the issue has arisen again. https://reviews.freebsd.org/D13858 fixed most of the non-contrib cases. I'd also like to see if we could find some more general solution, be it a compiler warning, bit set macro, or otherwise. -- Eitan Adler