frederick-vs-ja wrote:

> That is unimplementable without dynamically allocating and leaking memory, 
> which we certainly should not do and which nobody would thank us for doing.

Ah, I think 
[DR452](https://www.open-std.org/jtc1/sc22/wg14/issues/c11c17/issue0452.html) 
(adding "Such an object need not have a unique address.") also addressed this.

And then the patched C99 rule would be - the storage of the temporary object 
can be deallocated or reused later, but a pointer to it never becomes 
indeterminate. This is implementable but extremely weird, since it would 
indicate that some aspect of temporary objects is more persistent than that of 
other objects.

https://github.com/llvm/llvm-project/pull/133472
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to