[Bug middle-end/83032] Copy elision for returning subobject

2017-11-18 Thread antoshkka at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83032 --- Comment #2 from Antony Polukhin --- > I don't think that's one of the cases where the C++ standard allows elision Yes, you're right (currently I try to convince C++ standard pepole that allowing it could be benefical). But C does not

[Bug middle-end/83032] Copy elision for returning subobject

2017-11-17 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83032 --- Comment #1 from Marc Glisse --- I don't think that's one of the cases where the C++ standard allows elision, and I am not sure how that would work in practice. The idea for the return slot optimization is that the caller reserves enough