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

comparing unsigned to -2 #1682

Closed
ZuseZ4 opened this issue Feb 9, 2024 · 1 comment
Closed

comparing unsigned to -2 #1682

ZuseZ4 opened this issue Feb 9, 2024 · 1 comment
Labels
good first issue Good for newcomers

Comments

@ZuseZ4
Copy link
Member

ZuseZ4 commented Feb 9, 2024

if (idx == -2) {

While rebuilding I just noticed this warning - based on GCC 9.4.0 idx seems to be unsigned (and the getIndex function at the top also seems to return an unsigned). Not sure what's the original intention, so just creating an issue.

@tgymnich tgymnich changed the title comparigned unsigned to -2 comparing unsigned to -2 Feb 15, 2024
@tgymnich tgymnich added the bug Something isn't working label Feb 15, 2024
@wsmoses
Copy link
Member

wsmoses commented Feb 20, 2024

So this is an intentional sentinal, that we should probably change to a large unsigned value.

Specifically this value is used if there's an error in the indexing, such that the rest of compilation will succeed (and still have that error print, but not assertion internally).

@wsmoses wsmoses added the good first issue Good for newcomers label Feb 20, 2024
@tgymnich tgymnich removed the bug Something isn't working label Mar 5, 2024
@wsmoses wsmoses closed this as completed May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants