mirror of
https://gcc.gnu.org/git/gcc.git
synced 2026-02-22 03:46:53 -05:00
What we need to do here (and, of course, in the code synthesis that produces the objects) needs to be interoperable with other platforms that share ABI. For the present, this means Itanium and to interoperate with clang and libc++. The model we have followed in the development is essentially the same as the model used for the C++2a edition. However there is some concern that the read-only data footprint of this is potentially high and alternate schemes are in discussion with the clang folks. Since the layout of the violation object is ABI let's leave this in experimental until an agreed solution is fixed. Remove the cxx2a support at the same time, GCC no longer supports this mode. libstdc++-v3/ChangeLog: * include/Makefile.am: Add contract include. * include/Makefile.in: Regenerate. * include/bits/version.def: Add ftm for contracts. * include/bits/version.h: Regenerate. * include/precompiled/stdc++.h: Add contracts header. * include/std/source_location: Befriend the contract_violation class so that we can initialise a source_location from an existing __impl *. * src/c++23/std.cc.in: Add contracts support. * src/experimental/Makefile.am: Add new contract violation implementation, remove the old one. * src/experimental/Makefile.in: Regenerate. * include/experimental/contract: Removed. * src/experimental/contract.cc: Removed. * include/std/contracts: New file. * src/experimental/contract26.cc: New file. * testsuite/18_support/contracts/invoke_default_cvh.cc: New test. * testsuite/18_support/contracts/invoke_default_cvh2.cc: New test. Co-Authored-by: Iain Sandoe <iain@sandoe.co.uk> Co-Authored-by: Ville Voutilainen <ville.voutilainen@gmail.com> Signed-off-by: Nina Ranns <dinka.ranns@gmail.com>