https://github.com/python/cpython/commit/80295a8f9b624c8d962b1df6bc9b89049e11bcf5 commit: 80295a8f9b624c8d962b1df6bc9b89049e11bcf5 branch: main author: Chris Eibl <138194463+chris-e...@users.noreply.github.com> committer: picnixz <10796600+picn...@users.noreply.github.com> date: 2025-04-18T10:45:30+02:00 summary:
GH-131296: fix clang-cl warning on Windows in `Objects/longobject.c` for 32bit builds (#131604) files: M Objects/longobject.c diff --git a/Objects/longobject.c b/Objects/longobject.c index 692312c1ad976c..ffb3f95bdb9593 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -909,7 +909,9 @@ _PyLong_NumBits(PyObject *vv) assert(ndigits == 0 || v->long_value.ob_digit[ndigits - 1] != 0); if (ndigits > 0) { digit msd = v->long_value.ob_digit[ndigits - 1]; +#if SIZEOF_SIZE_T == 8 assert(ndigits <= INT64_MAX / PyLong_SHIFT); +#endif result = (int64_t)(ndigits - 1) * PyLong_SHIFT; msd_bits = bit_length_digit(msd); result += msd_bits; _______________________________________________ Python-checkins mailing list -- python-checkins@python.org To unsubscribe send an email to python-checkins-le...@python.org https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: arch...@mail-archive.com