Skip to content

Conversation

@cjjdespres
Copy link
Contributor

Shifting a negative signed value as was done here produces a clang warning about undefined behaviour.

Shifting a negative signed value as was done here produces a clang
warning about undefined behaviour.

Signed-off-by: Christian Despres <despres@ibm.com>
@cjjdespres
Copy link
Contributor Author

@mstoodle You mentioned in #5778 that your change avoids a compiler warning, but it produces the warning "error: shifting a negative signed value is undefined" in clang for me. It does seem as though the new code shifts a negative value, and the old code did not.

@mstoodle
Copy link
Contributor

mstoodle commented Nov 4, 2024

Hm, that might be a botched merge that I didn't notice as I rebased :( . I think it's also wrong (not just causing a warning). Thanks for catching it.

@mstoodle
Copy link
Contributor

mstoodle commented Nov 4, 2024

jenkins build all

@mstoodle mstoodle self-assigned this Nov 4, 2024
@mstoodle
Copy link
Contributor

mstoodle commented Nov 4, 2024

Verified there's no warning message with @cjjdespres 's recovery of the original code. Thanks for this catch @cjjdespres !

@mstoodle mstoodle merged commit a1cc349 into eclipse-omr:master Nov 4, 2024
Copy link
Contributor

@mstoodle mstoodle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants