-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Resolution on unsigned >= 0 checks #370
Comments
@scottpurdy do I take your comment (on some PR) as remove these |
@breznak Still a valid ticket? |
yes, still waiting for advice from others before taking up the simple but |
@scottpurdy Do you have any input? |
I support this. |
logic moved to nupic.core |
@breznak what do you mean? |
@rhyolight the c++ code is now in nupic.core repo, this issue is from '13. So I will just enable |
Is there a PR for this? |
@rhyolight closing as the checks have been fixed somewhen inbetween. and Wextra added in numenta/nupic.core-legacy#273 |
enabled in
-Wextra
, for GCC:comparison of unsigned expression >= 0 is always true [-Wtype-limits]
or on Clang: tautological compare warning.
We have
NTA_CHECK( 0 <= var && var <= MAX) << "var is out of range! "
serving as a gate. However the var is set to dattypeunsigned int
hence the warning. My question is: remove thevar >= 0
condition and assume (IFF) someone decides to change var's type to signed to take care of the checking? Or we want to keep this, and place surpress #pragma to each relevant occurence? Or we just keep ignoring and mute Wtype-limits?The text was updated successfully, but these errors were encountered: