http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55015
Robert Xiao <spam_hole at shaw dot ca> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |spam_hole at shaw dot ca --- Comment #2 from Robert Xiao <spam_hole at shaw dot ca> 2012-10-22 05:02:01 UTC --- Minimal reproducible testcase: typedef void (*VoidFunc)(); inline VoidFunc GetFunc() { return [](){}; } int main() { VoidFunc func = GetFunc(); } Compiled with gcc version 4.7.2 (MacPorts gcc47 4.7.2_2). Output: $ g++-mp-4.7 test.cpp -std=c++11 Undefined symbols for architecture x86_64: "GetFunc()::{lambda()#1}::_FUN()", referenced from: GetFunc()::{lambda()#1}::operator void (*)()() const in cciEeUag.o ld: symbol(s) not found for architecture x86_64 collect2: error: ld returned 1 exit status