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

MAINT: Silence integer comparison build warnings in assert statements #14485

Merged
merged 1 commit into from
Sep 12, 2019

Conversation

seberg
Copy link
Member

@seberg seberg commented Sep 11, 2019

Just a few warnings less on my gcc (debug) build at leas (was annoying me while writing larger amounts of new code and trying to find the relevant actual warnings)

@seberg
Copy link
Member Author

seberg commented Sep 11, 2019

Hmmm, maybe it should be uinptr type or something instead of npy_uintp in principle.

@WarrenWeckesser
Copy link
Member

What is the actual warning printed by the compiler?

@seberg
Copy link
Member Author

seberg commented Sep 12, 2019

numpy/core/src/umath/simd.inc.src: In function ‘sse2_sqrt_FLOAT’:
numpy/core/src/umath/simd.inc.src:1020:14: warning: comparison of integer expressions of different signedness: ‘npy_intp’ {aka ‘const long int’} and ‘long unsigned int’ [-Wsign-compare]
 1020 |     assert(n < (VECTOR_SIZE_BYTES / sizeof(@type@)) ||
      |              ^

@mattip mattip merged commit 9722d1b into numpy:master Sep 12, 2019
@mattip
Copy link
Member

mattip commented Sep 12, 2019

Let's go with the current implementation, thanks @seberg

@seberg seberg deleted the build-warnings branch September 12, 2019 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants