-
Notifications
You must be signed in to change notification settings - Fork 274
signed left-shift overflow depends on standard version #3690
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
Conversation
fec7fb8
to
287806f
Compare
287806f
to
3e0164e
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.
✔️
Passed Diffblue compatibility checks (cbmc commit: 3e0164e).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/96381233
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.
Add an extra variant of the test with --c99
?
3e0164e
to
689b2da
Compare
Sure, done |
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.
✔️
Passed Diffblue compatibility checks (cbmc commit: 689b2da).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/96410366
This fixes a copy & paste error.
The semantics of signed left shifts are contentious for the case that a '1' is shifted into the signed bit. Assuming 32-bit integers, 1<<31 is implementation-defined in ANSI C and C++98, but is explicitly undefined by C99, C11 and C++11.
689b2da
to
ae78609
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.
✔️
Passed Diffblue compatibility checks (cbmc commit: ae78609).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/96465454
@kroening it looks like you renamed the test.desc to |
The semantics of signed left shifts are contentious for the case
that a '1' is shifted into the signed bit.
Assuming 32-bit integers, 1<<31 is implementation-defined
in ANSI C and C++98, but is explicitly undefined by C99,
C11 and C++11.