http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58894
Daniel Krügler <daniel.kruegler at googlemail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |daniel.kruegler@googlemail. | |com --- Comment #1 from Daniel Krügler <daniel.kruegler at googlemail dot com> --- The code - as written - is invalid. Here is a valid form of this: //------------------------- int main() { const int a = 1; auto lambda = [&]() { &a; }; lambda(); } //-------------------------- It still produces the mentioned diagnostics even in gcc 4.9.0 20131026 (experimental). It doesn't seem to be a regression, I can track it down back to gcc 4.5.4