[Bug c++/79563] New: Same-name labels in lambdas considered duplicate
jengelh at inai dot de
gcc-bugzilla@gcc.gnu.org
Thu Feb 16 21:00:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79563
Bug ID: 79563
Summary: Same-name labels in lambdas considered duplicate
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: jengelh at inai dot de
Target Milestone: ---
$ clang++ -c cmd.cpp -std=gnu++11
$ g++-7 -c cmd.cpp -std=gnu++11
cmd.cpp: In function ‘void f()’:
cmd.cpp:2:7: error: label ‘exit’ used but not defined
goto exit;
^~~~
cmd.cpp:7:1: error: duplicate label ‘exit’
}
^
$ cat cmd.cpp
void f() {
goto exit;
[]() -> void {
exit: ;
}();
exit: ;
}
gcc version 7.0.1 20170214 (experimental) [trunk revision 245417] (SUSE Linux)
Also happens with 4.8, 5.4.1 and 6.3.1.
More information about the Gcc-bugs
mailing list