From 8c134b073dea14c7a096b4223f455fcb6efa23f3 Mon Sep 17 00:00:00 2001 From: Walter Bright Date: Sun, 21 Jun 2020 01:38:54 -0700 Subject: [PATCH] fix Issue 18734 - bitnum parameter of core.bitop.bt should be signed --- src/core/bitop.d | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/bitop.d b/src/core/bitop.d index b33ecc47ed..bc3a359a71 100644 --- a/src/core/bitop.d +++ b/src/core/bitop.d @@ -267,7 +267,7 @@ unittest * (No longer an intrisic - the compiler recognizes the patterns * in the body.) */ -int bt(const scope size_t* p, size_t bitnum) pure @system +int bt(const scope size_t* p, ptrdiff_t bitnum) pure @system { static if (size_t.sizeof == 8) return ((p[bitnum >> 6] & (1L << (bitnum & 63)))) != 0;