Open Chardrazle opened 2 years ago
Let me know if there are more unresolved warnings, I don't have the exact same version of GCC locally.
Looks good. Same warnings appeared on gcc 11.3 when I tried on godbolt. All clean with latest master: https://godbolt.org/z/MdKKf3zGP
Thanks for the quick update, and for sharing your work.
-Wsign-conversion
This is a quite aggressive gcc compiler warning, but it often detects issues so sometimes we test builds with it switched on. Because theconcurrentqueue
is header-only the warning permeates across the build. Obviously we can silence this via various means, but it is relatively straight-forward to perform the relevant casts in the code.The warning occurs on the few lines performing differences with division, such as 2021 and 2965:
The warning is emitted due to the signed result of
blockBaseIndex - headBase
being mixed with the unsignedBLOCK_SIZE
. CastingBLOCK_SIZE
to a signed type would be one possible fix.(g++ 11.2.1)