This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/42737] New: c++0x: error returning a lambda function
- From: "vimal78 at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jan 2010 22:30:50 -0000
- Subject: [Bug c++/42737] New: c++0x: error returning a lambda function
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
vimal@linux-718q:~/Study/09C++/c++0x/lambda> g++ return1.cpp -std=c++0x
return1.cpp: In function ?int (* f())()?:
return1.cpp:6:25: internal compiler error: canonical types differ for identical
types int() and int()
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
file: return1.cpp
=================
auto f() ->int(*)(){
auto m = [](){ return 0;};
return m;
}
int main() {
return 0;
}
--
Summary: c++0x: error returning a lambda function
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: vimal78 at gmail dot com
GCC build triplet: GNU C version 4.5.0 20091231 (experimental), GMP version
4.3.1,
GCC host triplet: /usr/local/lib/gcc/i686-pc-linux-gnu/4.5.0
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42737