https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65389
Bug ID: 65389 Summary: long compile time on incorrect code with lambdas Product: gcc Version: 4.9.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com The following program takes ages to compile: template <typename F, typename FF> void demangle_type_rec(F out, FF prepend_suffix) { // int class_type = // uncomment to get infinite stream of error messages demangle_type([&] {}); } template <typename Out> void demangle_type(Out out) { demangle_type_rec(out, [&] {}); } void print_seqid() { demangle_type([&] {}); } Probably it is possible to limit the compilation time on this incorrect case?