http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51270
--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-11-22
18:56:37 UTC ---
I don't think the warning should be restricted to conversions that only involve
different const-ness.
Here's a simpler testcase for the missed warning:
const int& f(long l)
{
const int& i = l;
return i;
}
See also PR 51066
