Re: Why does -Wabi-tag complain when -std=c++03?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>>>> 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.
>>
>> An example showing "abi2::MyType" is obviously not real code with real
>> names. That's just common sense.
>
> No, its not. I'm telling you this from first hand experience from reading it.
>
> My library does not have a problem; the issue is with with std::string
> and std::list. So I'm trying to figure out how to do the things needed
> to work with the updated std::string and std::list.
>
> I perform literal reads, and I don't like to make leaps. As soon as I
> leap, I'll be asked, "why the hell did you do that?".

Here's the actionable item to remove the ambiguity from ABI_CHANGE:

#ifdef MYLIB_ABI_CHANGE
inline namespace abi2 __attribute ((abi_tag)) {
  class MyType { ... };
  MyType fn();
}
#endif

That way, its clear the define is local to the library, and its not
coming from GCC or the runtime.

(Sorry to beleaguer the point).

Jeff



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux