Re:Proposal: expression to create pointer to simple types
by kevincox on Monday April 19, 2021 @12:03PM
(#26864285)
What do you mean by assigning to a pointer? You can only assign a pointer value to a pointer variable and you need to get that pointer from & IIUC.
[ Parent
| on HN ]
Re:Proposal: expression to create pointer to simple types
by masklinn on Monday April 19, 2021 @12:05PM
(#26864302)
> What do you mean by assigning to a pointer?
*x = y
Re:Proposal: expression to create pointer to simple types
by kevincox on Monday April 19, 2021 @01:04PM
(#26865120)
I don't think that does because IIUC you are copying the bits of y to x. So I guess semantically y has escaped but you aren't doing a new heap allocation, you are reusing the memory of x.