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

[intro.execution] Adjust example for unsequenced side effects #1084

Merged

Conversation

hubert-reinterpretcast
Copy link
Contributor

@hubert-reinterpretcast hubert-reinterpretcast commented Nov 21, 2016

Provides a case where side effects to the same memory location are unsequenced. Also removes an unreferenced function declaration.

@tkoeppe
Copy link
Contributor

tkoeppe commented Nov 21, 2016

@jensmaurer: Please take a look.

@hubert-reinterpretcast
Copy link
Contributor Author

My bad on the behavior is undefined line. The i++ + i was quite subtle.

@jensmaurer
Copy link
Member

No objection to removing the declaration of unused "f".
Regarding the other change: We already have an "undefined behavior" case, so I don't know if there's a particular need to add a second one, in particular since it doesn't fit with the "i = something" style in the other lines.

Removes an unreferenced function declaration from an example.
@hubert-reinterpretcast
Copy link
Contributor Author

I've revised the branch to only remove the unused f.

@tkoeppe tkoeppe merged commit 0248030 into cplusplus:master Nov 21, 2016
@hubert-reinterpretcast hubert-reinterpretcast deleted the intro_exec_p15_ub_fix branch July 24, 2017 20:39
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.

None yet

3 participants