On Fri, 23 Dec 2022 at 02:15, Hans-Peter Nilsson via Libstdc++ <libstd...@gcc.gnu.org> wrote: > > > From: Jonathan Wakely via Gcc-patches <gcc-patches@gcc.gnu.org> > > Date: Fri, 23 Dec 2022 00:37:04 +0100 > > > This is the largest missing piece of C++20 support. Only the cxx11 ABI > > is supported, due to the use of std::string in the API for time zones. > > > libstdc++-v3/ChangeLog: > > > > * acinclude.m4 (GLIBCXX_ZONEINFO_DIR): New macro. > > * config.h.in: Regenerate. > > * config/abi/pre/gnu.ver: Export new symbols. > > * configure: Regenerate. > > * configure.ac (GLIBCXX_ZONEINFO_DIR): Use new macro. > > * include/std/chrono (utc_clock::from_sys): Correct handling > > of leap seconds. > > (nonexistent_local_time::_M_make_what_str): Define. > > (ambiguous_local_time::_M_make_what_str): Define. > > (__throw_bad_local_time): Define new function. > > (time_zone, tzdb_list, tzdb): Implement all members. > > (remote_version, zoned_time, get_leap_second_info): Define. > > * include/std/version: Add comment for __cpp_lib_chrono. > > * src/c++20/Makefile.am: Add new file. > > * src/c++20/Makefile.in: Regenerate. > > * src/c++20/tzdb.cc: New file. > > * testsuite/lib/libstdc++.exp: Define effective target tzdb. > > * testsuite/std/time/clock/file/members.cc: Check file_time > > alias and file_clock::now() member. > > * testsuite/std/time/clock/gps/1.cc: Likewise for gps_clock. > > * testsuite/std/time/clock/tai/1.cc: Likewise for tai_clock. > > * testsuite/std/time/syn_c++20.cc: Uncomment everything except > > parse. > > * testsuite/std/time/clock/utc/leap_second_info.cc: New test. > > * testsuite/std/time/exceptions.cc: New test. > > * testsuite/std/time/time_zone/get_info_local.cc: New test. > > * testsuite/std/time/time_zone/get_info_sys.cc: New test. > > * testsuite/std/time/time_zone/requirements.cc: New test. > > * testsuite/std/time/tzdb/1.cc: New test. > > * testsuite/std/time/tzdb/leap_seconds.cc: New test. > > * testsuite/std/time/tzdb_list/1.cc: New test. > > * testsuite/std/time/tzdb_list/requirements.cc: New test. > > * testsuite/std/time/zoned_time/1.cc: New test. > > * testsuite/std/time/zoned_time/custom.cc: New test. > > * testsuite/std/time/zoned_time/deduction.cc: New test. > > * testsuite/std/time/zoned_time/req_neg.cc: New test. > > * testsuite/std/time/zoned_time/requirements.cc: New test. > > * testsuite/std/time/zoned_traits.cc: New test. > > > > +++ b/libstdc++-v3/src/c++20/tzdb.cc > > > + static_assert(sizeof(datetime) == 8 && alignof(datetime) == 4); > > This broke build for cris-elf: > x/autotest/hpautotest-gcc1/gcc/libstdc++-v3/src/c++20/tzdb.cc:451:38: error: > static assertion failed > 451 | static_assert(sizeof(datetime) == 8 && alignof(datetime) == 4); > | ~~~~~~~~~~~~~~~~~^~~~ > x/autotest/hpautotest-gcc1/gcc/libstdc++-v3/src/c++20/tzdb.cc:451:38: note: > the comparison reduces to '(7 == 8)' > make[5]: *** [Makefile:562: tzdb.lo] Error 1 > > (and I don't think "alignof(datetime) == 4" is true either)
Sorry about that, I can just remove the assertion now. I'll commit that ASAP.