[libcxx-commits] [libcxx] [libc++][test] Migrate _BitInt probe to __BITINT_MAXWIDTH__ and fix latent test bugs (PR #203876)
Yi Kong via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Jun 23 01:26:18 PDT 2026
kongy wrote:
This change caused `std/numerics/bit/byteswap.verify.cpp` to fail on Android's i386 builder:
```
# .---command stderr------------
# | error: 'expected-error' diagnostics expected but not seen:
# | File * Line * (directive at /[b/f/w/src/git/out/llvm-project/libcxx/test/std/numerics/bit/byteswap.verify.cpp:130](https://cs.corp.google.com/piper///depot/google3/b/f/w/src/git/out/llvm-project/libcxx/test/std/numerics/bit/byteswap.verify.cpp?l=130)): {{(std::byteswap requires T to have no padding bits|byteswap is unimplemented for integral types of this size)}}
# | 1 error generated.
# `-----------------------------
```
```
void test_unsigned_96() {
// sizeof(_BitInt(96)) == 16 on x86_64; 32 padding bits.
unsigned _BitInt(96) v = 0;
// expected-error-re@*:* {{{{(std::byteswap requires T to have no padding bits|byteswap is unimplemented for integral types of this size)}}}}
(void)std::byteswap(v);
}
```
does not emit the expected error.
https://godbolt.org/z/3f8erGsYq
https://github.com/llvm/llvm-project/pull/203876
More information about the libcxx-commits
mailing list