Skip to content

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

Merged
mattip merged 1 commit into
numpy:masterfrom
seberg:build-warnings
Sep 12, 2019
Merged

mattip merged 1 commit into
numpy:masterfrom
seberg:build-warnings

Conversation

@seberg

@seberg seberg commented Sep 11, 2019

Copy link
Copy Markdown
Member

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

seberg commented Sep 11, 2019

Copy link
Copy Markdown
Member Author

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

@WarrenWeckesser

Copy link
Copy Markdown
Member

What is the actual warning printed by the compiler?

@seberg

seberg commented Sep 12, 2019

Copy link
Copy Markdown
Member Author
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

mattip commented Sep 12, 2019

Copy link
Copy Markdown
Member

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