c++/5293: [3.3/3.4 regression] [2003-04-30] confusing message when binding a temporary to a reference
Giovanni Bajo
giovannibajo@libero.it
Fri May 2 19:36:00 GMT 2003
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5293
Reconfirmed on 3.4 CVS 20030430 and 3.3 CVS 20030421:
pr5293.cpp: In function `any_class& operator*=(any_class&, const any_class&)
[with any_class = C1]':
pr5293.cpp:25: instantiated from here
pr5293.cpp:18: error: could not convert `C1::operator=(const
C1&)((&C1::operator*(const C1&) const((+q))))' to `C1&'
This is a regression wrt 2.95 which was emitting:
pr5293.cpp: In function `class C1 & operator *=<C1>(C1 &, const C1 &)':
pr5293.cpp:25: instantiated from here
pr5293.cpp:18: initialization of non-const reference type `class C1 &'
pr5293.cpp:18: from rvalue of type `C1'
pr5293.cpp:18: warning: returning reference to temporary
Giovanni Bajo
More information about the Gcc-bugs
mailing list