Fix undefined behavior: left-shifting into the sign bit.
Reviewed by: dim, markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D22898
This commit is contained in:
parent
de1380c36b
commit
5e7a2b174a
|
@ -44,7 +44,7 @@
|
|||
#define __constexpr_cond(expr) (__builtin_constant_p((expr)) && (expr))
|
||||
|
||||
#define __bitset_mask(_s, n) \
|
||||
(1L << (__constexpr_cond(__bitset_words((_s)) == 1) ? \
|
||||
(1UL << (__constexpr_cond(__bitset_words((_s)) == 1) ? \
|
||||
(__size_t)(n) : ((n) % _BITSET_BITS)))
|
||||
|
||||
#define __bitset_word(_s, n) \
|
||||
|
|
Loading…
Reference in New Issue