aboutsummaryrefslogtreecommitdiff
path: root/gcc/except.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2021-06-24 17:32:02 -0400
committerJason Merrill <jason@redhat.com>2021-06-26 00:13:46 -0400
commit2168bfb81448ae1bfa4351760a23d4ec051c2a00 (patch)
treed6d80b172fe5d8f0bf40c1332b30470439d2f28b /gcc/except.c
parent2afe882858699bb6c13f8502f4f6e862a126d4ef (diff)
downloadgcc-2168bfb81448ae1bfa4351760a23d4ec051c2a00.zip
gcc-2168bfb81448ae1bfa4351760a23d4ec051c2a00.tar.gz
gcc-2168bfb81448ae1bfa4351760a23d4ec051c2a00.tar.bz2
c++: constexpr aggr init of empty class [PR101040]
This is basically the aggregate initializer version of PR97566; as in that bug, we are trying to initialize empty field 'obj' in 'single' when there's no CONSTRUCTOR entry for the 'single' base class subobject of 'derived'. As with that bug, the fix is to stop trying to add entries for empty fields, this time in cxx_eval_bare_aggregate. The change to the other function isn't necessary for this version of the patch, but seems worthwhile for robustness anyway. PR c++/101040 PR c++/97566 gcc/cp/ChangeLog: * class.c (is_empty_field): Handle null argument. * constexpr.c (cxx_eval_bare_aggregate): Discard initializer for empty field. gcc/testsuite/ChangeLog: * g++.dg/cpp2a/no_unique_address13.C: New test.
Diffstat (limited to 'gcc/except.c')
0 files changed, 0 insertions, 0 deletions