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

Inconsistent meaning of "result of a call" #4723

Closed
xmh0511 opened this issue Jun 28, 2021 · 1 comment
Closed

Inconsistent meaning of "result of a call" #4723

xmh0511 opened this issue Jun 28, 2021 · 1 comment

Comments

@xmh0511
Copy link
Contributor

xmh0511 commented Jun 28, 2021

[stmt.return#5]

The copy-initialization of the result of the call is sequenced before the destruction of temporaries at the end of the full-expression established by the operand of the return statement, which, in turn, is sequenced before the destruction of local variables ([stmt.jump]) of the block enclosing the return statement.

Presumably, the result of the call in this paragraph refers to "glvalue result or prvalue result object".

However, in section [expr.call]

The result of a function call is the result of the possibly-converted operand of the return statement ([stmt.return]) that transferred control out of the called function (if any)

we give the wording "result of a call" an obviously different meaning.

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

No branches or pull requests

1 participant