public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/55017] New: [C++11] Rvalue-reference member should cause copy constructor not deleted, but still declared
@ 2012-10-22 7:54 daniel.kruegler at googlemail dot com
2012-10-22 8:28 ` [Bug c++/55017] [C++11] Rvalue-reference member should cause copy constructor to be " redi at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: daniel.kruegler at googlemail dot com @ 2012-10-22 7:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55017
Bug #: 55017
Summary: [C++11] Rvalue-reference member should cause copy
constructor not deleted, but still declared
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: daniel.kruegler@googlemail.com
Using gcc 4.8.0 20121014 (experimental) with the compiler flags
-Wall -pedantic -std=c++11
the following code is incorrectly accepted:
//----------------------
struct S {
int&& rr;
S(int&& rr) : rr(static_cast<int&&>(rr)) {}
};
S s1(13);
S s2 = s1; // Should be rejected
//----------------------
This code should be rejected, because a non-static rvalue-reference member
causes the copy-constructor to be deleted as of 12.8 p11 b5. (Note: Even though
12.8 is currently under investigation bei CWG, there are no intentions to
change this part of the wording)
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/55017] [C++11] Rvalue-reference member should cause copy constructor to be deleted, but still declared
2012-10-22 7:54 [Bug c++/55017] New: [C++11] Rvalue-reference member should cause copy constructor not deleted, but still declared daniel.kruegler at googlemail dot com
@ 2012-10-22 8:28 ` redi at gcc dot gnu.org
2013-02-14 20:47 ` redi at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2012-10-22 8:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55017
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-10-22
Summary|[C++11] Rvalue-reference |[C++11] Rvalue-reference
|member should cause copy |member should cause copy
|constructor not deleted, |constructor to be deleted,
|but still declared |but still declared
Ever Confirmed|0 |1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-10-22 08:28:26 UTC ---
Confirmed, not a regression
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/55017] [C++11] Rvalue-reference member should cause copy constructor to be deleted, but still declared
2012-10-22 7:54 [Bug c++/55017] New: [C++11] Rvalue-reference member should cause copy constructor not deleted, but still declared daniel.kruegler at googlemail dot com
2012-10-22 8:28 ` [Bug c++/55017] [C++11] Rvalue-reference member should cause copy constructor to be " redi at gcc dot gnu.org
@ 2013-02-14 20:47 ` redi at gcc dot gnu.org
2013-02-14 20:49 ` [Bug c++/55017] [DR 1051] " redi at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2013-02-14 20:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55017
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |wlodzimierz.lipert at gmail
| |dot com
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-02-14 20:47:27 UTC ---
*** Bug 56319 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/55017] [DR 1051] [C++11] Rvalue-reference member should cause copy constructor to be deleted, but still declared
2012-10-22 7:54 [Bug c++/55017] New: [C++11] Rvalue-reference member should cause copy constructor not deleted, but still declared daniel.kruegler at googlemail dot com
2012-10-22 8:28 ` [Bug c++/55017] [C++11] Rvalue-reference member should cause copy constructor to be " redi at gcc dot gnu.org
2013-02-14 20:47 ` redi at gcc dot gnu.org
@ 2013-02-14 20:49 ` redi at gcc dot gnu.org
2013-02-15 19:36 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2013-02-14 20:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55017
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[C++11] Rvalue-reference |[DR 1051] [C++11]
|member should cause copy |Rvalue-reference member
|constructor to be deleted, |should cause copy
|but still declared |constructor to be deleted,
| |but still declared
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-02-14 20:48:50 UTC ---
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1051
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/55017] [DR 1051] [C++11] Rvalue-reference member should cause copy constructor to be deleted, but still declared
2012-10-22 7:54 [Bug c++/55017] New: [C++11] Rvalue-reference member should cause copy constructor not deleted, but still declared daniel.kruegler at googlemail dot com
` (2 preceding siblings ...)
2013-02-14 20:49 ` [Bug c++/55017] [DR 1051] " redi at gcc dot gnu.org
@ 2013-02-15 19:36 ` jason at gcc dot gnu.org
2013-03-17 2:36 ` jason at gcc dot gnu.org
2013-04-01 21:06 ` jason at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2013-02-15 19:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55017
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |jason at gcc dot gnu.org
|gnu.org |
--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> 2013-02-15 19:35:40 UTC ---
Created attachment 29476
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29476
p
Patch waiting for 4.8 to branch.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/55017] [DR 1051] [C++11] Rvalue-reference member should cause copy constructor to be deleted, but still declared
2012-10-22 7:54 [Bug c++/55017] New: [C++11] Rvalue-reference member should cause copy constructor not deleted, but still declared daniel.kruegler at googlemail dot com
` (3 preceding siblings ...)
2013-02-15 19:36 ` jason at gcc dot gnu.org
@ 2013-03-17 2:36 ` jason at gcc dot gnu.org
2013-04-01 21:06 ` jason at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2013-03-17 2:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55017
--- Comment #5 from Jason Merrill <jason at gcc dot gnu.org> 2013-03-17 02:35:18 UTC ---
Author: jason
Date: Sun Mar 17 02:35:01 2013
New Revision: 196728
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=196728
Log:
PR c++/55017
* method.c (walk_field_subobs): Disallow copy of rvalue ref.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/rv-copy1.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/method.c
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/testsuite/20_util/pair/piecewise2.cc
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/55017] [DR 1051] [C++11] Rvalue-reference member should cause copy constructor to be deleted, but still declared
2012-10-22 7:54 [Bug c++/55017] New: [C++11] Rvalue-reference member should cause copy constructor not deleted, but still declared daniel.kruegler at googlemail dot com
` (4 preceding siblings ...)
2013-03-17 2:36 ` jason at gcc dot gnu.org
@ 2013-04-01 21:06 ` jason at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jason at gcc dot gnu.org @ 2013-04-01 21:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55017
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.9.0
--- Comment #6 from Jason Merrill <jason at gcc dot gnu.org> 2013-04-01 21:06:42 UTC ---
Fixed for 4.9.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-04-01 21:06 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-22 7:54 [Bug c++/55017] New: [C++11] Rvalue-reference member should cause copy constructor not deleted, but still declared daniel.kruegler at googlemail dot com
2012-10-22 8:28 ` [Bug c++/55017] [C++11] Rvalue-reference member should cause copy constructor to be " redi at gcc dot gnu.org
2013-02-14 20:47 ` redi at gcc dot gnu.org
2013-02-14 20:49 ` [Bug c++/55017] [DR 1051] " redi at gcc dot gnu.org
2013-02-15 19:36 ` jason at gcc dot gnu.org
2013-03-17 2:36 ` jason at gcc dot gnu.org
2013-04-01 21:06 ` jason at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).