public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/56285] New: [C++11] Arguments to an inheriting constructor is not forwarded properly
@ 2013-02-11 11:56 lucdanton at free dot fr
2013-02-11 13:15 ` [Bug c++/56285] [C++11] Arguments to an inheriting constructor are " redi at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: lucdanton at free dot fr @ 2013-02-11 11:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56285
Bug #: 56285
Summary: [C++11] Arguments to an inheriting constructor is not
forwarded properly
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: lucdanton@free.fr
Created attachment 29417
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29417
Minimal reproducible testcase
$ g++-snapshot --version
g++-snapshot (Debian 20130209-1) 4.8.0 20130209 (experimental) [trunk revision
195917]
$ cat main.cpp
struct foo {
explicit foo(int&&) {}
};
struct bar: private foo {
using foo::foo;
};
int main()
{
bar b { 42 };
}
$ g++-snapshot -Wall -std=c++11 main.cpp
main.cpp: In constructor 'bar::bar(int&&)':
main.cpp:6:16: error: cannot bind 'int' lvalue to 'int&&'
using foo::foo;
^
main.cpp:2:14: error: initializing argument 1 of 'foo::foo(int&&)'
explicit foo(int&&) {}
^
main.cpp: In function 'int main()':
main.cpp:11:16: note: synthesized method 'bar::bar(int&&)' first required here
bar b { 42 };
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/56285] [C++11] Arguments to an inheriting constructor are not forwarded properly
2013-02-11 11:56 [Bug c++/56285] New: [C++11] Arguments to an inheriting constructor is not forwarded properly lucdanton at free dot fr
@ 2013-02-11 13:15 ` redi at gcc dot gnu.org
2013-02-12 17:57 ` jason at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2013-02-11 13:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56285
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |rejects-valid
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-02-11
Ever Confirmed|0 |1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-02-11 13:14:42 UTC ---
[class.inhctor]/8 says bar should have an implicitly-defined constructor
equivalent to
bar(int&& p) : foo(static_cast<int&&>(p)) { }
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/56285] [C++11] Arguments to an inheriting constructor are not forwarded properly
2013-02-11 11:56 [Bug c++/56285] New: [C++11] Arguments to an inheriting constructor is not forwarded properly lucdanton at free dot fr
2013-02-11 13:15 ` [Bug c++/56285] [C++11] Arguments to an inheriting constructor are " redi at gcc dot gnu.org
@ 2013-02-12 17:57 ` jason at gcc dot gnu.org
2013-02-12 20:47 ` jason at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2013-02-12 17:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56285
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |jason at gcc dot gnu.org
AssignedTo|unassigned at gcc dot |jason at gcc dot gnu.org
|gnu.org |
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/56285] [C++11] Arguments to an inheriting constructor are not forwarded properly
2013-02-11 11:56 [Bug c++/56285] New: [C++11] Arguments to an inheriting constructor is not forwarded properly lucdanton at free dot fr
2013-02-11 13:15 ` [Bug c++/56285] [C++11] Arguments to an inheriting constructor are " redi at gcc dot gnu.org
2013-02-12 17:57 ` jason at gcc dot gnu.org
@ 2013-02-12 20:47 ` jason at gcc dot gnu.org
2013-02-13 2:26 ` jason at gcc dot gnu.org
2013-02-14 9:56 ` redi at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2013-02-12 20:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56285
--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> 2013-02-12 20:47:23 UTC ---
Author: jason
Date: Tue Feb 12 20:47:15 2013
New Revision: 195990
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195990
Log:
PR c++/56285
* method.c (add_one_base_init): Handle base constructor
taking rvalue reference parm.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/inh-ctor16.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/method.c
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/56285] [C++11] Arguments to an inheriting constructor are not forwarded properly
2013-02-11 11:56 [Bug c++/56285] New: [C++11] Arguments to an inheriting constructor is not forwarded properly lucdanton at free dot fr
` (2 preceding siblings ...)
2013-02-12 20:47 ` jason at gcc dot gnu.org
@ 2013-02-13 2:26 ` jason at gcc dot gnu.org
2013-02-14 9:56 ` redi at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: jason at gcc dot gnu.org @ 2013-02-13 2:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56285
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.8.0
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> 2013-02-13 02:26:05 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/56285] [C++11] Arguments to an inheriting constructor are not forwarded properly
2013-02-11 11:56 [Bug c++/56285] New: [C++11] Arguments to an inheriting constructor is not forwarded properly lucdanton at free dot fr
` (3 preceding siblings ...)
2013-02-13 2:26 ` jason at gcc dot gnu.org
@ 2013-02-14 9:56 ` redi at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2013-02-14 9:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56285
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |potswa at mac dot com
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-02-14 09:56:15 UTC ---
*** Bug 56317 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-02-14 9:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-11 11:56 [Bug c++/56285] New: [C++11] Arguments to an inheriting constructor is not forwarded properly lucdanton at free dot fr
2013-02-11 13:15 ` [Bug c++/56285] [C++11] Arguments to an inheriting constructor are " redi at gcc dot gnu.org
2013-02-12 17:57 ` jason at gcc dot gnu.org
2013-02-12 20:47 ` jason at gcc dot gnu.org
2013-02-13 2:26 ` jason at gcc dot gnu.org
2013-02-14 9:56 ` redi 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).