This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Henry Schreiner
Recipients Henry Schreiner
Date 2020-07-22.03:49:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1595389781.15.0.650471141646.issue41366@roundup.psfhosted.org>
In-reply-to
Content
The macro Py_UNICODE_COPY was replaced by a function in CPython 3.9, and that function cannot compile with full warnings enabled + warnings as errors under Clang. The problematic line:

Py_DEPRECATED(3.3) static inline void
Py_UNICODE_COPY(Py_UNICODE *target, const Py_UNICODE *source, Py_ssize_t length) {
    memcpy(target, source, length * sizeof(Py_UNICODE));
}

has an implicit conversion of Py_ssize_t into size_t, which creates:

/Users/runner/hostedtoolcache/Python/3.9.0-beta.5/x64/include/python3.9/cpython/unicodeobject.h:55:: implicit conversion changes signedness: 'Py_ssize_t' (aka 'long') to 'unsigned long' [-Werror,-Wsign-conversion]

error: implicit conversion changes signedness: 'Py_ssize_t' (aka 'long') to 'unsigned long' [-Werror,-Wsign-conversion]
    memcpy(target, source, length * sizeof(Py_UNICODE));    memcpy(target, source, length * sizeof(Py_UNICODE));

An explicit cast to size_t (is there a Py_size_t?) should be made.
History
Date User Action Args
2020-07-22 03:49:41Henry Schreinersetrecipients: + Henry Schreiner
2020-07-22 03:49:41Henry Schreinersetmessageid: <1595389781.15.0.650471141646.issue41366@roundup.psfhosted.org>
2020-07-22 03:49:41Henry Schreinerlinkissue41366 messages
2020-07-22 03:49:40Henry Schreinercreate