This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/32658] Supposedly illegal conversion compiles without errors


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).

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]