Skip to content

Commit

Permalink
Account for the entity being initialized for address space assignment…
Browse files Browse the repository at this point in the history
… during prvalue-to-xvalue conversion
  • Loading branch information
Naghasan committed Nov 30, 2023
1 parent 9d8e159 commit 4e5fafe
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions adoc/chapters/device_compiler.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -761,8 +761,11 @@ device kernel or code called by the device kernel.
** Static data members are treated the same way as for variable in namespace
scope

If a prvalue-to-xvalue conversion happens in a block scope or function parameter
scope, the result is assigned to the local address space if it happens a
If a prvalue-to-xvalue conversion happens as part of the an initialization
expression, then the result is assigned to the same address space as the entity
being initialized.
Otherwise, if the conversion happens in a block scope or function parameter
scope, the result is assigned to the local address space if it happens in a
hierarchical context otherwise it is assigned to the private address space.
It the prvalue-to-xvalue conversion happens in another scope, the result is
assigned in the same way as declaration in namespace scope.
Expand Down

0 comments on commit 4e5fafe

Please sign in to comment.