Skip to content

Inconsistent meaning of "result of a call" #4723

Closed
@xmh0511

Description

@xmh0511

[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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions