Re: [patch] Implement move semantics for iostreams

2014-09-25 Thread Rainer Orth
Hi Jonathan, >>it does: {i386-pc, sparc-sun}-solaris2.1[01] bootstraps completed >>successfully with it. > > Great. I hope the slightly-modified version I eventually checked in > still works too :) it does indeed, as just verified by a i386-pc-solaris2.11 bootstrap :-) Rainer -- --

Re: [patch] Implement move semantics for iostreams

2014-09-25 Thread Jonathan Wakely
On 25/09/14 13:05 +0200, Rainer Orth wrote: Hi Jonathan, almost there: now I only get ld: fatal: libstdc++-symbols.ver-sun: 4622: symbol 'std::basic_ostream >::basic_ostream(std::basic_iostream >&)': symbol version conflict ld: fatal: libstdc++-symbols.ver-sun: 4623: symbol 'std::basic_ostream

Re: [patch] Implement move semantics for iostreams

2014-09-25 Thread Rainer Orth
Hi Jonathan, >>almost there: now I only get >> >>ld: fatal: libstdc++-symbols.ver-sun: 4622: symbol >>'std::basic_ostream >>>::basic_ostream(std::basic_iostream >&)': >>symbol version conflict >>ld: fatal: libstdc++-symbols.ver-sun: 4623: symbol >>'std::basic_ostream >>>::basic_ostream(std::b

Re: [patch] Implement move semantics for iostreams

2014-09-25 Thread Jonathan Wakely
On 25/09/14 07:11 +0200, Marc Glisse wrote: On Wed, 24 Sep 2014, Jonathan Wakely wrote: I'm tempted to tidy up the GLIBCXX_3.4 patterns in the linker script quite considerably, Paolo has done something like that this summer (motivated by -O0 builds) and reverted it for a detail, but it could

Re: [patch] Implement move semantics for iostreams

2014-09-24 Thread Marc Glisse
On Wed, 24 Sep 2014, Jonathan Wakely wrote: I'm tempted to tidy up the GLIBCXX_3.4 patterns in the linker script quite considerably, Paolo has done something like that this summer (motivated by -O0 builds) and reverted it for a detail, but it could be a good starting point. -- Marc Glisse

Re: [patch] Implement move semantics for iostreams

2014-09-24 Thread Jonathan Wakely
On 24/09/14 15:48 +0100, Jonathan Wakely wrote: On 24/09/14 16:38 +0200, Rainer Orth wrote: Hi Jonathan, On 23/09/14 15:58 +0200, Rainer Orth wrote: This patch broke Solaris bootstrap with Sun ld: when linking libstdc++.so, ld complains ld: fatal: libstdc++-symbols.ver-sun: 4520: symbol 'std

Re: [patch] Implement move semantics for iostreams

2014-09-24 Thread Jonathan Wakely
On 24/09/14 16:38 +0200, Rainer Orth wrote: Hi Jonathan, On 23/09/14 15:58 +0200, Rainer Orth wrote: This patch broke Solaris bootstrap with Sun ld: when linking libstdc++.so, ld complains ld: fatal: libstdc++-symbols.ver-sun: 4520: symbol 'std::basic_ios >::move(std::basic_ios >&&)': symbol

Re: [patch] Implement move semantics for iostreams

2014-09-24 Thread Rainer Orth
Hi Jonathan, > On 23/09/14 15:58 +0200, Rainer Orth wrote: >>This patch broke Solaris bootstrap with Sun ld: when linking >>libstdc++.so, ld complains >> >>ld: fatal: libstdc++-symbols.ver-sun: 4520: symbol 'std::basic_ios> std::char_traits >::move(std::basic_ios> std::char_traits >&&)': symbol ve

Re: [patch] Implement move semantics for iostreams

2014-09-24 Thread Jonathan Wakely
On 23/09/14 15:58 +0200, Rainer Orth wrote: This patch broke Solaris bootstrap with Sun ld: when linking libstdc++.so, ld complains ld: fatal: libstdc++-symbols.ver-sun: 4520: symbol 'std::basic_ios >::move(std::basic_ios >&&)': symbol version conflict and many more. In that case, I find that

Re: [patch] Implement move semantics for iostreams

2014-09-24 Thread Marek Polacek
On Wed, Sep 24, 2014 at 12:01:13PM +0200, Jakub Jelinek wrote: > > - if (!__lhs_local && !__lhs_local) > > + if (!__lhs_local && !__rhs_local) > > std::swap(_M_word, __rhs._M_word); > > else > > { > > Wouldn't this be something for a (non-Wall?) warning? > I mean if &

Re: [patch] Implement move semantics for iostreams

2014-09-24 Thread Jakub Jelinek
On Wed, Sep 24, 2014 at 10:40:09AM +0100, Jonathan Wakely wrote: > On 22/09/14 14:35 +0100, Jonathan Wakely wrote: > >This adds move and swap functions to the iostream classes. > > This fixes a silly typo. > > Tested x86_64-linux, committed to trunk. > > commit acaef9854dff5f37d86b80fc8236df5fd

Re: [patch] Implement move semantics for iostreams

2014-09-24 Thread Jonathan Wakely
On 22/09/14 14:35 +0100, Jonathan Wakely wrote: This adds move and swap functions to the iostream classes. This fixes a silly typo. Tested x86_64-linux, committed to trunk. commit acaef9854dff5f37d86b80fc8236df5fd90b0ca5 Author: Jonathan Wakely Date: Wed Sep 24 10:10:28 2014 +0100 PR

Re: [patch] Implement move semantics for iostreams

2014-09-23 Thread Jonathan Wakely
On 23/09/14 15:58 +0200, Rainer Orth wrote: This patch broke Solaris bootstrap with Sun ld: when linking libstdc++.so, ld complains ld: fatal: libstdc++-symbols.ver-sun: 4520: symbol 'std::basic_ios >::move(std::basic_ios >&&)': symbol version conflict and many more. In that case, I find that

Re: [patch] Implement move semantics for iostreams

2014-09-23 Thread Rainer Orth
Jonathan Wakely writes: > This adds move and swap functions to the iostream classes. > > Although this is a pretty large patch, it's a pure addition that only > affects C++11 mode, and should have no effect on existing code because > it won't be moving or swapping streams. > > I wanted to use C++

Re: [patch] Implement move semantics for iostreams

2014-09-23 Thread Jonathan Wakely
On 23/09/14 11:48 +0200, Andreas Schwab wrote: FAIL: g++.old-deja/g++.law/ctors10.C -std=c++11 (test for excess errors) Excess errors: /daten/aranym/gcc/gcc-20140923/gcc/testsuite/g++.old-deja/g++.law/ctors10.C:16:46: error: call of overloaded 'basic_ostream(NULL)' is ambiguous Fixed by this

Re: [patch] Implement move semantics for iostreams

2014-09-23 Thread Jonathan Wakely
On 23/09/14 11:48 +0200, Andreas Schwab wrote: Jonathan Wakely writes: Although this is a pretty large patch, it's a pure addition that only affects C++11 mode, and should have no effect on existing code because it won't be moving or swapping streams. FAIL: g++.old-deja/g++.law/ctors10.C -s

Re: [patch] Implement move semantics for iostreams

2014-09-23 Thread Andreas Schwab
Jonathan Wakely writes: > Although this is a pretty large patch, it's a pure addition that only > affects C++11 mode, and should have no effect on existing code because > it won't be moving or swapping streams. FAIL: g++.old-deja/g++.law/ctors10.C -std=c++11 (test for excess errors) Excess erro

[patch] Implement move semantics for iostreams

2014-09-22 Thread Jonathan Wakely
This adds move and swap functions to the iostream classes. Although this is a pretty large patch, it's a pure addition that only affects C++11 mode, and should have no effect on existing code because it won't be moving or swapping streams. I wanted to use C++14's std::exchange so I added std::__