https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86226
Bug ID: 86226 Summary: A bug seems to be not fully fixed Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: zhonghao at pku dot org.cn Target Milestone: --- The code is as follow: int main() { auto l = []<typename>(){}; l.operator()<void>(); } It was reported in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77914. Michele Caini complains that g++ does not produce any warnings for this ill-formed code. The report is said to be resolved, since 7+. I tried on 8.0.1 with the same flags, -Wall -pedantic. I got a warning: lambda templates are only available with -std=c++2a or -std=gnu++2a So, I change the flag to -std=c++2a. This time, g++ accepts it without any messages. I also tried clang++. It produces the following error messages: error: expected body of lambda expression auto l = []<typename>(){}; error: expected a qualified name after 'typename' auto l = []<typename>(){}; It seems that the bug is not fixed, right?