This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libstdc++ PATCH to add abi tag to complex::real/imag

On Sat, 10 Nov 2012, Jason Merrill wrote:

As mentioned in, C++11 changes the return type of complex::real and imag, leading to a binary incompatibility between C++98 and C++11 code if the functions are used without inlining. This patch adds an ABI tag to the C++11 variants so that they have different mangled names. This does not change the exports from libstdc++.

It looks like it won't prevent from using ref-qualifiers when they are implemented if we want to (PR 51013), which is good.

For the map void->iterator change, I think it would make sense to just unconditionally return an iterator;

It does break C++98 code that does "return f();" in a function returning void, but that's negligible.

there's no binary compatibility issue with older code that expects it to return void, the problem is only with C++11 code calling a C++98 instantiation that returns void.

That's going to happen in practice, isn't it? So do you mean to add the abi tag to this unified function, for safety?

Marc Glisse

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]