This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/86226] New: A bug seems to be not fully fixed
- From: "zhonghao at pku dot org.cn" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 20 Jun 2018 02:23:05 +0000
- Subject: [Bug c++/86226] New: A bug seems to be not fully fixed
- Auto-submitted: auto-generated
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?