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

Sequencing UB #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

ScottyBauer
Copy link
Contributor

May need some modification of the expected output. It's extremely hard to reason about what someone would actually expect these programs to do.

Signed-off-by: Scotty Bauer sbauer@eng.utah.edu

May need some modification of the expected output. It's extremely hard to reason about what someone would actually expect the program to do.

Signed-off-by: Scotty Bauer <sbauer@eng.utah.edu>
@ScottyBauer
Copy link
Contributor Author

woops I have kernel tabbing on, I'll fix that in the morning match the rest of the code.

@ScottyBauer ScottyBauer reopened this Apr 28, 2015
/* programmer assumes left to right evaluation,
even with unary ops mixed in */
/* 16 + 15 + (50 * 50) + 50 + 15 */
result = x = y = x++ + x-- + (y*=2 * y) + y + x ;
Copy link
Owner

Choose a reason for hiding this comment

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

I'm not sure about your interpretation here (I tried multiple times to come up with a good example like this and also had a hard time). Can you refactor into simpler UBs such as i = i++?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants