This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/32658] Supposedly illegal conversion compiles without errors
- From: "nathan at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 10 Oct 2016 13:05:39 +0000
- Subject: [Bug c++/32658] Supposedly illegal conversion compiles without errors
- Auto-submitted: auto-generated
- References: <bug-32658-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32658
Nathan Sidwell <nathan at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #12 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
This appears resolved.
32658.ii: In function 'void bar()':
32658.ii:12:6: error: invalid initialization of non-const reference of type
'xyz&' from an rvalue of type 'xyz'
foo(xyz());
^~~~~
32658.ii:9:6: note: initializing argument 1 of 'void foo(xyz&)'
void foo(xyz &);
^~~
which looks right to me. Now we have rvalue refs, one can DTRT (doesn't help
Aristid thoug).