diff options
author | Jason Merrill <jason@redhat.com> | 2022-08-24 16:28:32 -0400 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2022-08-25 17:03:10 -0400 |
commit | 072d3115c0e297d91c133c4214b357b0a50557b9 (patch) | |
tree | 56aee593ee7bddd43a1bb5437d74dd52235fc1ea /gcc/c | |
parent | 30e160475489867a09ed89532cae135b5849cf98 (diff) | |
download | gcc-072d3115c0e297d91c133c4214b357b0a50557b9.zip gcc-072d3115c0e297d91c133c4214b357b0a50557b9.tar.gz gcc-072d3115c0e297d91c133c4214b357b0a50557b9.tar.bz2 |
c++: block copy elision in delegating ctor
CWG2403 deals with the issue that copy elision is not possible when the
initialized object is a potentially-overlapping subobject and the
initializer is a function that returns by value. Jonathan pointed out that
this also affects delegating constructors, which might be used to construct
a base subobject.
gcc/cp/ChangeLog:
* call.cc (unsafe_return_slot_p): Return 2 for *this in a
constructor.
gcc/testsuite/ChangeLog:
* g++.dg/init/elide8.C: New test.
Diffstat (limited to 'gcc/c')
0 files changed, 0 insertions, 0 deletions