aboutsummaryrefslogtreecommitdiff
path: root/move-if-change
diff options
context:
space:
mode:
authorAlexandre Oliva <oliva@adacore.com>2023-11-29 04:00:28 -0300
committerAlexandre Oliva <oliva@gnu.org>2023-11-29 04:00:28 -0300
commit71804526d3a71a8c0f189a89ce3aa615784bfd8b (patch)
treee3d053600f3a444b702102e2bd11d8a77ede4f5f /move-if-change
parent1ff6d9f7428b0668cd8ab0b3e3ab94f1d733124d (diff)
downloadgcc-71804526d3a71a8c0f189a89ce3aa615784bfd8b.zip
gcc-71804526d3a71a8c0f189a89ce3aa615784bfd8b.tar.gz
gcc-71804526d3a71a8c0f189a89ce3aa615784bfd8b.tar.bz2
c++: for contracts, cdtors never return this
When targetm.cxx.cdtor_return_this() holds, cdtors have a non-VOID_TYPE_P result, but IMHO this ABI implementation detail shouldn't leak to the abstract language conceptual framework, in which cdtors don't have return values. For contracts, specifically those that establish postconditions on results, such a leakage is present, and the present patch puts an end to it: with it, cdtors get an error for result postconditions regardless of the ABI. This fixes g++.dg/contracts/contracts-ctor-dtor2.C on arm-eabi. for gcc/cp/ChangeLog * contracts.cc (check_postcondition_result): Cope with cdtor_return_this.
Diffstat (limited to 'move-if-change')
0 files changed, 0 insertions, 0 deletions