On Wed, 14 Jul 2021, LIU Hao wrote:

在 7/14/21 9:02 PM, Martin Storsjö 写道:
+unsigned char _bittestandset(__LONG32 *__a, __LONG32 __b)
+{
+    unsigned char __v = (*__a >> __b) & 1;
+    *__a |= (1 << __b);

I suggest `1UL` here, as shifting 1 to the left by 31 is undefined behavior.

Thanks, will update all these.

// Martin

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to