[Bug c++/42370] [C++0x][lambda] in a void function: "Warning: control reaches end of non-void function"
rodrigorivascosta at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Dec 16 17:05:00 GMT 2009
------- Comment #3 from rodrigorivascosta at gmail dot com 2009-12-16 17:05 -------
If the lambda line is changed from:
[] { return 0; };
into any of the following:
[=] { return 0; };
[&] { return 0; };
int foo = 0;
[foo] { return 0; };
The warnings disappear.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42370
More information about the Gcc-bugs
mailing list