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

2012-11-12 Thread Jason Merrill
On 11/12/2012 01:50 AM, Marc Glisse wrote: When we are changing the whole type, I assume the point of using this attribute instead of the standard solutions (move it to some other (inline) namespace, for instance) is the -Wabi-tag warning? Right. Jason

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

2012-11-11 Thread Marc Glisse
On Sat, 10 Nov 2012, Jason Merrill wrote: As mentioned in http://gcc.gnu.org/wiki/Cxx11AbiCompatibility, 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

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

2012-11-11 Thread Jonathan Wakely
On 11 November 2012 02:27, Jason Merrill wrote: Is this patch OK for trunk? Does someone on the library team want to look at the other cases? The patch looks good to me. Thanks for implementing the attribute. I'll start looking at some of the other cases. For std::list I assume we want the

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

2012-11-11 Thread Paolo Carlini
Hi, On 11/11/2012 12:55 PM, Jonathan Wakely wrote: On 11 November 2012 02:27, Jason Merrill wrote: Is this patch OK for trunk? Does someone on the library team want to look at the other cases? The patch looks good to me. Thanks for implementing the attribute. I'll start looking at some of

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

2012-11-11 Thread Jason Merrill
On 11/11/2012 06:55 AM, Jonathan Wakely wrote: For std::list I assume we want the attribute on the type itself, not just member functions, since its size changes. Yes. Note that I believe for the list and string changes we want to change the default ABI for C++98 and C++11, not just C++11.

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

2012-11-11 Thread Marc Glisse
On Sun, 11 Nov 2012, Jason Merrill wrote: On 11/11/2012 06:55 AM, Jonathan Wakely wrote: For std::list I assume we want the attribute on the type itself, not just member functions, since its size changes. When we are changing the whole type, I assume the point of using this attribute instead

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

2012-11-10 Thread Jason Merrill
As mentioned in http://gcc.gnu.org/wiki/Cxx11AbiCompatibility, 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