This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Why does -Wabi-tag complain when -std=c++03?
- From: Jeffrey Walton <noloader at gmail dot com>
- To: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- Cc: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Thu, 24 Mar 2016 10:36:25 -0400
- Subject: Re: Why does -Wabi-tag complain when -std=c++03?
- Authentication-results: sourceware.org; auth=none
- References: <CAH8yC8kYCmJqN4E5s9KQP1sH+PdV0axg9GuEf8MPeMQs0ede_w at mail dot gmail dot com> <CAH6eHdQYuMxhEJFD_P7GD1UgTy+oL4d_To9zwY8SJ1VRAD7J=w at mail dot gmail dot com> <CAH8yC8=SPMAapcOLo1=z5VpBnF3icoSzOjYZvNqZvkzuJeYYUA at mail dot gmail dot com> <CAH6eHdSSFOqHkpYBDn-GCE_U=hyZjJ0_-aXxENeRwQ=EHm6S0g at mail dot gmail dot com> <CAH8yC8k0m7c8deWa9GomCrCkLdAocwtqWJy7hvWJtgriKVsm7w at mail dot gmail dot com> <CAH6eHdQmQM_vw70aVgo_qdsXsahNWtGwEne=TxtAK4K1bHX9+w at mail dot gmail dot com> <CAH8yC8=TB=BSxKA1rPSU5xbOyoRGdhtZH60uwss23dXtqPHiZA at mail dot gmail dot com> <CAH6eHdRwhF__1uiL00RXqa8obhRaPN0=OFtW82hTT9O2sc2C_w at mail dot gmail dot com>
- Reply-to: noloader at gmail dot com
On Thu, Mar 24, 2016 at 10:28 AM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> On 24 March 2016 at 14:03, Jeffrey Walton <noloader@gmail.com> wrote:
>>>>> The new std::string and std::list are also valid implementations for C++03.
>>>>
>>>> OK, good. Thanks.
>>>>
>>>> If its a valid implementation, then why is the compiler complaining?
>>>
>>> That question doesn't even make sense. GCC's warnings aren't there to
>>> say "this implementation does not conform to the standard".
>>
>> Yeah, it only get worse:
>>
>> $ g++ -x c++ -include iostream -dM -E - </dev/null | grep ABI_CHANGE
>> $ g++ -x c++ -include iostream -std=c++11 -dM -E - </dev/null | grep ABI_CHANGE
>> $
>
> What's this supposed to show? Worse than what?
That it makes even less sense when trying to follow the blog post.
> The ABI_CHANGE macro in the blog post is just an example of a macro
> that might appear in a third-party library, it's not defined by GCC. I
> thought the fact the example defines abi2::MyType made that fairly
> obvious. That isn't defined by GCC either.
Actually, no, its not fairly obvious. If that was the intention, then
they only needed to state it.
>> I get the problem its trying to solve; especially the part about the
>> return type ABI. But I have to admit I'm just about totally confused
>> about the implementation details for library authors, the coexisting
>> symbols discussed in the blog, and the ABI_CHANGE change macro.
>
> So don't try to support coexistence then, require users to use a build
> of your library that uses the same ABI as the rest of their libraries
> and objects.
I'd _love_ to support coexistence so the problems go away for users.
That's kind of our duty here. We suffer the problem so users don't
have to.
But for the life of me, I can't figure out how to get both symbols
included in the library and make coexitence work. Every time I try
something (like changing options) I get one set of symbols or the
other. I can't seem to get both of them in the library.
Jeff