src: use hex not decimal in IsArrayIndex#31758
src: use hex not decimal in IsArrayIndex#31758codebytere wants to merge 1 commit intonodejs:masterfrom
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 :) |
addaleax
left a comment
There was a problem hiding this comment.
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
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