[libc-commits] [libc] [libc] Make `stdc_first_trailing_one` spec compliant (PR #116493)
via libc-commits
libc-commits at lists.llvm.org
Tue Nov 19 05:37:59 PST 2024
================
@@ -91,7 +91,7 @@ TYPED_TEST(LlvmLibcBitTest, FirstTrailingZero, UnsignedTypesNoBigInt) {
}
TYPED_TEST(LlvmLibcBitTest, FirstTrailingOne, UnsignedTypesNoBigInt) {
- EXPECT_EQ(first_trailing_one<T>(cpp::numeric_limits<T>::max()), 0);
----------------
strncmp wrote:
They are not correct. The max value should make the function return 1 (since the least significant bit is set), not 0, but I can add them both.
https://github.com/llvm/llvm-project/pull/116493
More information about the libc-commits
mailing list