On Fri, 9 May 2025 at 18:13, Jonathan Wakely <jwak...@redhat.com> wrote: > > On Fri, 9 May 2025 at 11:19, Jonathan Wakely <jwak...@redhat.com> wrote: > > > > On Thu, 8 May 2025 at 20:56, Jason Merrill <ja...@redhat.com> wrote: > > > > > > Tested x86_64-pc-linux-gnu. Does this make sense for trunk? > > > > Yes, it looks useful. I'm going to test it with my "very -std and -m32 > > and old-string ABI" test settings to be sure it doesn't cause any > > problems. > > There are a few failures when using GLIBCXX_TESTSUITE_STDS=20 to run > tests as C++20 or later: > > FAIL: experimental/net/internet/resolver/ops/lookup.cc -std=gnu++23 > (test for excess errors) > Excess errors: > /tmp/build/x86_64-pc-linux-gnu/libstdc++-v3/include/experimental/internet:2100: > warning: offset of > 'std::experimental::net::v1::ip::basic_resolver<std::experimental::net::v1::ip::tcp>::_M_ctx' > for '-std=c++20' and up changes in '-fabi-version=21' (GCC 16) [-Wabi]
We have code like this in the networking TS headers: struct Base { protected: Base() = default; ~Base() = default; }; struct Derived : Base { void* ptr; }; Is the warning wrong? > > FAIL: experimental/optional/requirements.cc -std=gnu++20 (test for > excess errors) > Excess errors: > /home/test/src/gcc/libstdc++-v3/testsuite/experimental/optional/requirements.cc:80: > warning: offset of 'no_copy_assignment::__as_base ' base class for > '-std=c++20' and up changes in '-fabi-version=21' (GCC 16) [-Wabi] > /home/test/src/gcc/libstdc++-v3/testsuite/experimental/optional/requirements.cc:81: > warning: offset of 'no_move_assignment::__as_base ' base class for > '-std=c++20' and up changes in '-fabi-version=21' (GCC 16) [-Wabi] This is just test code, which looks like: struct no_move_constructor { no_move_constructor() = default; no_move_constructor(no_move_constructor const&) = default; no_move_constructor& operator=(no_move_constructor const&) = default; no_move_constructor(no_move_constructor&&) = delete; no_move_constructor& operator=(no_move_constructor&&) = default; }; struct no_move_assignment { no_move_assignment() = default; no_move_assignment(no_move_assignment const&) = default; no_move_assignment& operator=(no_move_assignment const&) = default; no_move_assignment(no_move_assignment&&) = default; no_move_assignment& operator=(no_move_assignment&&) = delete; }; struct no_move : no_move_constructor, no_move_assignment { };