[Bug c++/53488] Incorrect code generated when capturing a constant by reference in a lambda

daniel.kruegler at googlemail dot com gcc-bugzilla@gcc.gnu.org
Fri May 25 20:11:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53488

Daniel Krügler <daniel.kruegler at googlemail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |daniel.kruegler at
                   |                            |googlemail dot com

--- Comment #3 from Daniel Krügler <daniel.kruegler at googlemail dot com> 2012-05-25 20:09:20 UTC ---
An interesting aspect of this example is that when using gcc 4.8.0 20120520
(experimental) compiled in C++11 mode with -Wall it produces the warning

"7|warning: 'i' is used uninitialized in this function [-Wuninitialized]"

where line 7 is the line of the lambda-expression and producing an output of:

0



More information about the Gcc-bugs mailing list