-
Notifications
You must be signed in to change notification settings - Fork 30k
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
src: use hex not decimal in IsArrayIndex #31758
Conversation
@codebytere thanks for the PR, and apologies for the compiler issue! This is actually a completely daft bug, which I included a fix for, rolled into the PR at https://github.com/nodejs/node/pull/31625/files#diff-4a5950be44f56dfca2e7fa3c4e1fc0e4R966, although that PR with the current approval will take another 5 days to land unless we get another approval there. If that is the case, and you need this sooner, it may well be better to just port that fix here. |
Yeah, I think the compiler is correct to warn here, and we should use its suggestion rather than just make the warning go away :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this would be ready to land now, I’ll make it explicit that the previous code was buggy and we should not remove the warning about the bug (and rather fix it)
ed59501
to
6cb838e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
PR-URL: #31758 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Landed in 3a22549 |
PR-URL: #31758 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: #31758 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: #31758 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: #31758 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
In Electron, clang enforces
-Wxor-used-as-pow
, so the previous line would cause the following error:The simplest solution i see is to just use hex to clarify intent for the compiler, and so this PR does so.
cc @guybedford
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes