diff options
author | Jason Merrill <jason@redhat.com> | 2022-02-04 18:25:51 -0500 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2022-02-08 20:09:55 -0500 |
commit | 53cac72cf0821217f99d0640ba72cc2999ec7dc0 (patch) | |
tree | 39afa87017a50078ed99e8bb01e7e247b317246f /gcc/analyzer/region.h | |
parent | 2a2fda2d9bebb9ef7fe4b9c8aa492a6517603e21 (diff) | |
download | gcc-53cac72cf0821217f99d0640ba72cc2999ec7dc0.zip gcc-53cac72cf0821217f99d0640ba72cc2999ec7dc0.tar.gz gcc-53cac72cf0821217f99d0640ba72cc2999ec7dc0.tar.bz2 |
c++: cleanup constant-init'd members [PR96876]
This is a case missed by my recent fixes to aggregate initialization and
exception cleanup for PR94041 et al: we also need to clean up members with
constant initialization if initialization of a later member throws.
It also occurs to me that we needn't bother building the cleanups if
-fno-exceptions; build_vec_init already doesn't.
PR c++/96876
gcc/cp/ChangeLog:
* typeck2.cc (split_nonconstant_init_1): Push cleanups for
preceding members with constant initialization.
(maybe_push_temp_cleanup): Do nothing if -fno-exceptions.
gcc/testsuite/ChangeLog:
* g++.dg/cpp1z/aggr-base11.C: New test.
* g++.dg/eh/aggregate2.C: New test.
Diffstat (limited to 'gcc/analyzer/region.h')
0 files changed, 0 insertions, 0 deletions