Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New warning: "comparison of integer expressions of different signedness: ‘Py_ssize_t’ {aka ‘long int’} and ‘long unsigned int’ [-Wsign-compare]" #115391

Closed
sobolevn opened this issue Feb 13, 2024 · 3 comments
Assignees
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@sobolevn
Copy link
Member

sobolevn commented Feb 13, 2024

Bug report

It happens after 7861dfd#diff-1a6e70e2beeecad88840c67284ac4d54a36998029244771fcc820e801390726aR1138

Objects/longobject.c:1138:20: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and 'unsigned long' [-Wsign-compare]
        else if (n <= sizeof(cv.b)) {
                 ~ ^  ~~~~~~~~~~~~

For some reason it is reported on another line on GitHub:

Снимок экрана 2024-02-13 в 10 06 54

I have a PR ready.

Linked PRs

@sobolevn sobolevn added type-bug An unexpected behavior, bug, or error interpreter-core (Objects, Python, Grammar, and Parser dirs) labels Feb 13, 2024
@sobolevn sobolevn self-assigned this Feb 13, 2024
sobolevn added a commit to sobolevn/cpython that referenced this issue Feb 13, 2024
@Eclips4
Copy link
Member

Eclips4 commented Feb 13, 2024

We already have a PR for that: #115368

@sobolevn
Copy link
Member Author

Please, create an issue next time :)

@sobolevn
Copy link
Member Author

I realized that this is a new warning: #115827 Not the same one.

Sorry for the noise!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants