* [Bug c++/42352] -std=c++0x reference binding problem
2009-12-11 18:04 [Bug c++/42352] New: -std=c++0x reference binding problem rwgk at yahoo dot com
@ 2009-12-11 18:05 ` rwgk at yahoo dot com
2009-12-11 18:17 ` paolo dot carlini at oracle dot com
` (14 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: rwgk at yahoo dot com @ 2009-12-11 18:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rwgk at yahoo dot com 2009-12-11 18:05 -------
Created an attachment (id=19277)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19277&action=view)
reproducer
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42352
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/42352] -std=c++0x reference binding problem
2009-12-11 18:04 [Bug c++/42352] New: -std=c++0x reference binding problem rwgk at yahoo dot com
2009-12-11 18:05 ` [Bug c++/42352] " rwgk at yahoo dot com
@ 2009-12-11 18:17 ` paolo dot carlini at oracle dot com
2009-12-11 18:23 ` paolo dot carlini at oracle dot com
` (13 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-12-11 18:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from paolo dot carlini at oracle dot com 2009-12-11 18:17 -------
The std::, c++0x, version, is in flux. If you want the old behavior, just use
std::tr1::bind for now, and do not expect and C++0x-conforming behavior.
Really, no point in keeping open issues vs ongoing C++0x work.
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42352
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/42352] -std=c++0x reference binding problem
2009-12-11 18:04 [Bug c++/42352] New: -std=c++0x reference binding problem rwgk at yahoo dot com
2009-12-11 18:05 ` [Bug c++/42352] " rwgk at yahoo dot com
2009-12-11 18:17 ` paolo dot carlini at oracle dot com
@ 2009-12-11 18:23 ` paolo dot carlini at oracle dot com
2009-12-11 18:43 ` paolo dot carlini at oracle dot com
` (12 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-12-11 18:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from paolo dot carlini at oracle dot com 2009-12-11 18:22 -------
:) Sorry, this issue has nothing to do with std::bind (ansd std::tr1::bind) of
course. This is actually about list::splcie and list::merge, which indeed are
still in flux in the WP, see DR 1133, or:
http://gcc.gnu.org/ml/libstdc++/2009-12/msg00011.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42352
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/42352] -std=c++0x reference binding problem
2009-12-11 18:04 [Bug c++/42352] New: -std=c++0x reference binding problem rwgk at yahoo dot com
` (2 preceding siblings ...)
2009-12-11 18:23 ` paolo dot carlini at oracle dot com
@ 2009-12-11 18:43 ` paolo dot carlini at oracle dot com
2009-12-11 18:43 ` paolo dot carlini at oracle dot com
` (11 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-12-11 18:43 UTC (permalink / raw)
To: gcc-bugs
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |paolo dot carlini at oracle
|dot org |dot com
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-12-11 18:43:47
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42352
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/42352] -std=c++0x reference binding problem
2009-12-11 18:04 [Bug c++/42352] New: -std=c++0x reference binding problem rwgk at yahoo dot com
` (3 preceding siblings ...)
2009-12-11 18:43 ` paolo dot carlini at oracle dot com
@ 2009-12-11 18:43 ` paolo dot carlini at oracle dot com
2009-12-11 19:28 ` rwgk at yahoo dot com
` (10 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-12-11 18:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from paolo dot carlini at oracle dot com 2009-12-11 18:43 -------
Bah, we can use some std::move(s) in the splice and merge calls used by sort,
and solve this. We'll be reverted as unnecessary when DR 1133 will be resolved,
but maybe can make people more happy for the time being...
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42352
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/42352] -std=c++0x reference binding problem
2009-12-11 18:04 [Bug c++/42352] New: -std=c++0x reference binding problem rwgk at yahoo dot com
` (4 preceding siblings ...)
2009-12-11 18:43 ` paolo dot carlini at oracle dot com
@ 2009-12-11 19:28 ` rwgk at yahoo dot com
2009-12-11 21:05 ` paolo dot carlini at oracle dot com
` (9 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: rwgk at yahoo dot com @ 2009-12-11 19:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from rwgk at yahoo dot com 2009-12-11 19:27 -------
Thanks for the fast response!
Everything else we have works with -std=c++0x.
If this issue is fixed I could keep testing with -std=c++0x,
which I imagine could be of great value long term.
(We have several 100k of sources + boost + an extensive test
suite exercising numerical procedures.)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42352
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug c++/42352] -std=c++0x reference binding problem
2009-12-11 18:04 [Bug c++/42352] New: -std=c++0x reference binding problem rwgk at yahoo dot com
` (5 preceding siblings ...)
2009-12-11 19:28 ` rwgk at yahoo dot com
@ 2009-12-11 21:05 ` paolo dot carlini at oracle dot com
2009-12-11 22:05 ` [Bug libstdc++/42352] " paolo at gcc dot gnu dot org
` (8 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-12-11 21:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from paolo dot carlini at oracle dot com 2009-12-11 21:04 -------
Thanks. This specific issue I will fix in one day or so. But be warned that
until DR 1133 is resolved by the ISO C++ Committee likely you will encounter
problems with list::splice and list::merge.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42352
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug libstdc++/42352] -std=c++0x reference binding problem
2009-12-11 18:04 [Bug c++/42352] New: -std=c++0x reference binding problem rwgk at yahoo dot com
` (6 preceding siblings ...)
2009-12-11 21:05 ` paolo dot carlini at oracle dot com
@ 2009-12-11 22:05 ` paolo at gcc dot gnu dot org
2009-12-11 22:10 ` paolo dot carlini at oracle dot com
` (7 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: paolo at gcc dot gnu dot org @ 2009-12-11 22:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from paolo at gcc dot gnu dot org 2009-12-11 22:05 -------
Subject: Bug 42352
Author: paolo
Date: Fri Dec 11 22:04:56 2009
New Revision: 155180
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155180
Log:
2009-12-11 Paolo Carlini <paolo.carlini@oracle.com>
PR libstdc++/42352
* include/bits/list.tcc (sort): Use _GLIBCXX_MOVE for list::splice
and list::merge calls.
* testsuite/23_containers/list/operations/42352.cc: New.
Added:
trunk/libstdc++-v3/testsuite/23_containers/list/operations/42352.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/list.tcc
trunk/libstdc++-v3/include/parallel/numeric
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42352
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug libstdc++/42352] -std=c++0x reference binding problem
2009-12-11 18:04 [Bug c++/42352] New: -std=c++0x reference binding problem rwgk at yahoo dot com
` (7 preceding siblings ...)
2009-12-11 22:05 ` [Bug libstdc++/42352] " paolo at gcc dot gnu dot org
@ 2009-12-11 22:10 ` paolo dot carlini at oracle dot com
2009-12-12 5:49 ` rwgk at yahoo dot com
` (6 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-12-11 22:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from paolo dot carlini at oracle dot com 2009-12-11 22:10 -------
list::sort (both overloads) should be fine now, if you notice something
strange, please let me know...
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42352
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug libstdc++/42352] -std=c++0x reference binding problem
2009-12-11 18:04 [Bug c++/42352] New: -std=c++0x reference binding problem rwgk at yahoo dot com
` (8 preceding siblings ...)
2009-12-11 22:10 ` paolo dot carlini at oracle dot com
@ 2009-12-12 5:49 ` rwgk at yahoo dot com
2009-12-12 9:10 ` paolo dot carlini at oracle dot com
` (5 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: rwgk at yahoo dot com @ 2009-12-12 5:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from rwgk at yahoo dot com 2009-12-12 05:49 -------
Thanks very much for the quick fix!
It didn't clear up all errors of this type, though, when compiling our code (I
verified that the original problem is fixed). Based on your comments I decided
to remove the -std=c++x0 for the small section of our sources which trigger the
errors. I can still compile around 99% with the -std=c++0x option.
Let me know if/when you are interested in reduced examples of the other
failures.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42352
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug libstdc++/42352] -std=c++0x reference binding problem
2009-12-11 18:04 [Bug c++/42352] New: -std=c++0x reference binding problem rwgk at yahoo dot com
` (9 preceding siblings ...)
2009-12-12 5:49 ` rwgk at yahoo dot com
@ 2009-12-12 9:10 ` paolo dot carlini at oracle dot com
2009-12-12 9:17 ` paolo dot carlini at oracle dot com
` (4 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-12-12 9:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from paolo dot carlini at oracle dot com 2009-12-12 09:10 -------
What do you mean by "of this type"? As I tried already to explain, until the
ISO C++ Committee resolves DR 1133 we cannot touch list::merge and
list::splice. If, however, you are seeing problems with calls to list::sort,
those can be resolved in our implementation right now (even if it's work
somewhat wasted, because eventually the implementation of the resolution of DR
1133 will make those changes unnecessary)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42352
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug libstdc++/42352] -std=c++0x reference binding problem
2009-12-11 18:04 [Bug c++/42352] New: -std=c++0x reference binding problem rwgk at yahoo dot com
` (10 preceding siblings ...)
2009-12-12 9:10 ` paolo dot carlini at oracle dot com
@ 2009-12-12 9:17 ` paolo dot carlini at oracle dot com
2009-12-14 6:05 ` rwgk at yahoo dot com
` (3 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-12-12 9:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from paolo dot carlini at oracle dot com 2009-12-12 09:17 -------
Just to clarify a bit more: if, on the other hand, you are seeing problems
*outside* the library, because you used to rely in your code on rvalue
references binding to lvalues, there is absolutely nothing we an do about it,
your code must be simply adjusted to the current behavior of rvalue references.
You can find it explained here:
http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2844.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42352
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug libstdc++/42352] -std=c++0x reference binding problem
2009-12-11 18:04 [Bug c++/42352] New: -std=c++0x reference binding problem rwgk at yahoo dot com
` (11 preceding siblings ...)
2009-12-12 9:17 ` paolo dot carlini at oracle dot com
@ 2009-12-14 6:05 ` rwgk at yahoo dot com
2009-12-14 8:40 ` paolo dot carlini at oracle dot com
` (2 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: rwgk at yahoo dot com @ 2009-12-14 6:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from rwgk at yahoo dot com 2009-12-14 06:05 -------
(In reply to comment #10)
> What do you mean by "of this type"? As I tried already to explain, until the
> ISO C++ Committee resolves DR 1133 we cannot touch list::merge and
> list::splice.
Sorry, I wasn't looking carefully enough. The remaining errors are indeed
different. Reduced below.
If I comment out all .splice() in our code everything else compiles.
The DR details are over my head, I'm afraid. Does "cannot touch" mean we are
stuck with a broken list.splice() and .merge() for now, until the standards
committee has made changes?
#include <list>
void work()
{
std::list<int> l, m;
l.splice(l.end(), m);
}
% g++ -c -std=c++0x ~/gcc_bugs/list_splice_bind.cpp
/net/cci/rwgk/gcc_bugs/list_splice_bind.cpp: In function 'void work()':
/net/cci/rwgk/gcc_bugs/list_splice_bind.cpp:6:21: error: cannot bind
'std::list<int>' lvalue to 'std::list<int>&&'
/net/cci-filer1/vol1/tmp/rwgk/gcc_trunk_155182_fc12_x86_64/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/../../../../include/c++/4.5.0/bits/stl_list.h:1154:7:
error: initializing argument 2 of 'void std::list<_Tp,
_Alloc>::splice(std::list<_Tp, _Alloc>::iterator, std::list<_Tp, _Alloc>&&)
[with _Tp = int, _Alloc = std::allocator<int>, std::list<_Tp, _Alloc>::iterator
= std::_List_iterator<int>, std::list<_Tp, _Alloc> = std::list<int>]'
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42352
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug libstdc++/42352] -std=c++0x reference binding problem
2009-12-11 18:04 [Bug c++/42352] New: -std=c++0x reference binding problem rwgk at yahoo dot com
` (12 preceding siblings ...)
2009-12-14 6:05 ` rwgk at yahoo dot com
@ 2009-12-14 8:40 ` paolo dot carlini at oracle dot com
2009-12-19 15:09 ` rwgk at yahoo dot com
2009-12-19 20:29 ` paolo dot carlini at oracle dot com
15 siblings, 0 replies; 17+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-12-14 8:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from paolo dot carlini at oracle dot com 2009-12-14 08:39 -------
Yes, you understood correctly, that is our policy and nothing changes if you
overstate the issue by using the "broken" catch-all. To repeat, our general
policy is that any issue corresponding to an ISO DR is not dealt with until the
DR has reached at least [Ready] status, because we cannot risk going back and
forward between different resolutions and other tentative fixes. Normally the
policy is applied even more strictly for C++0x issues, given the experimental
nature.
That said, this specific issue has been moved yesterday to [Tentatively Ready]
and it's safe enough to simply re-add for now the C++03 set of overloads (we
don't implement yet the C++0x allocator model), I'll do that later today. For
reference:
http://home.roadrunner.com/~hinnant/issue_review/lwg-active.html#1133
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42352
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug libstdc++/42352] -std=c++0x reference binding problem
2009-12-11 18:04 [Bug c++/42352] New: -std=c++0x reference binding problem rwgk at yahoo dot com
` (13 preceding siblings ...)
2009-12-14 8:40 ` paolo dot carlini at oracle dot com
@ 2009-12-19 15:09 ` rwgk at yahoo dot com
2009-12-19 20:29 ` paolo dot carlini at oracle dot com
15 siblings, 0 replies; 17+ messages in thread
From: rwgk at yahoo dot com @ 2009-12-19 15:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from rwgk at yahoo dot com 2009-12-19 15:09 -------
(In reply to comment #13)
> That said, this specific issue has been moved yesterday to [Tentatively Ready]
> and it's safe enough to simply re-add for now the C++03 set of overloads (we
> don't implement yet the C++0x allocator model), I'll do that later today.
For the records, I can now use -std=c++0x again for everything we have
(I tested with svn rev. 155354).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42352
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug libstdc++/42352] -std=c++0x reference binding problem
2009-12-11 18:04 [Bug c++/42352] New: -std=c++0x reference binding problem rwgk at yahoo dot com
` (14 preceding siblings ...)
2009-12-19 15:09 ` rwgk at yahoo dot com
@ 2009-12-19 20:29 ` paolo dot carlini at oracle dot com
15 siblings, 0 replies; 17+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-12-19 20:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from paolo dot carlini at oracle dot com 2009-12-19 20:29 -------
Good ;)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42352
^ permalink raw reply [flat|nested] 17+ messages in thread