[PATCH RFC] libstdc++: run testsuite with -Wabi

Jason Merrill jason@redhat.com
Mon May 12 15:13:34 GMT 2025


On 5/9/25 1:31 PM, Jonathan Wakely wrote:
> On Fri, 9 May 2025 at 18:13, Jonathan Wakely <jwakely@redhat.com> wrote:
>>
>> On Fri, 9 May 2025 at 11:19, Jonathan Wakely <jwakely@redhat.com> wrote:
>>>
>>> On Thu, 8 May 2025 at 20:56, Jason Merrill <jason@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?

Hmm, it seems to be: sizeof(Derived) isn't affected by -std=c++20 before 
the fix, I guess the warning doesn't handle empty bases properly.

Jason



More information about the Libstdc++ mailing list