aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/openmp.cc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2025-04-30 10:18:46 -0400
committerJason Merrill <jason@redhat.com>2025-05-02 07:49:09 -0400
commite6e3b0772ed40cc65a544bbe744ece62d8b9713e (patch)
tree6c392c05fb5a2c57d5145a3a6b84c8735412f284 /gcc/fortran/openmp.cc
parent4af5de21363cfdd2be227c05dfdee7e053337f6a (diff)
downloadgcc-e6e3b0772ed40cc65a544bbe744ece62d8b9713e.zip
gcc-e6e3b0772ed40cc65a544bbe744ece62d8b9713e.tar.gz
gcc-e6e3b0772ed40cc65a544bbe744ece62d8b9713e.tar.bz2
c++: C++17/20 class layout divergence [PR120012]
C++20 made a class with only explicitly defaulted constructors no longer aggregate, and this wrongly affected whether the class is considered "POD for layout purposes" under the ABI. Conveniently, we already have check_non_pod_aggregate to diagnose cases where this makes a difference, due to PR103681 around a C++14 aggregate change. PR c++/120012 gcc/cp/ChangeLog: * cp-tree.h (struct lang_type): Add non_aggregate_pod. (CLASSTYPE_NON_AGGREGATE_POD): New. * class.cc (check_bases_and_members): Set it. (check_non_pod_aggregate): Diagnose it. gcc/ChangeLog: * doc/invoke.texi: Document C++20 aggregate fix. * common.opt: Likewise. gcc/testsuite/ChangeLog: * g++.dg/abi/base-defaulted1.C: New test. * g++.dg/abi/base-defaulted1a.C: New test.
Diffstat (limited to 'gcc/fortran/openmp.cc')
0 files changed, 0 insertions, 0 deletions