[Bug c++/67273] Incorrect -Wshadow warning with generic lambdas
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67273 Paolo Carlini changed: What|Removed |Added CC||daiw at gmx dot net --- Comment #6 from Paolo Carlini --- *** Bug 78850 has been marked as a duplicate of this bug. ***
[Bug c++/67273] Incorrect -Wshadow warning with generic lambdas
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67273 Nathan Sidwell changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #5 from Nathan Sidwell --- Fixed r245067.
[Bug c++/67273] Incorrect -Wshadow warning with generic lambdas
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67273 --- Comment #4 from Nathan Sidwell --- Author: nathan Date: Tue Jan 31 18:05:37 2017 New Revision: 245067 URL: https://gcc.gnu.org/viewcvs?rev=245067=gcc=rev Log: PR c++/67273 PR c++/79253 * pt.c: (instantiate_decl): Push to top level when current function scope doesn't match. Only push lmabda scope stack when pushing to top. PR c++/67273 PR c++/79253 * g++.dg/cpp1y/pr67273.C: New. * g++.dg/cpp1y/pr79253.C: New. Added: trunk/gcc/testsuite/g++.dg/cpp1y/pr67273.C trunk/gcc/testsuite/g++.dg/cpp1y/pr79253.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/pt.c trunk/gcc/testsuite/ChangeLog
[Bug c++/67273] Incorrect -Wshadow warning with generic lambdas
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67273 Nathan Sidwell changed: What|Removed |Added CC||jens.auer at cgi dot com --- Comment #3 from Nathan Sidwell --- *** Bug 67951 has been marked as a duplicate of this bug. ***
[Bug c++/67273] Incorrect -Wshadow warning with generic lambdas
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67273 Nathan Sidwell changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |nathan at gcc dot gnu.org
[Bug c++/67273] Incorrect -Wshadow warning with generic lambdas
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67273 Nathan Sidwell changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2017-01-26 Ever confirmed|0 |1
[Bug c++/67273] Incorrect -Wshadow warning with generic lambdas
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67273 Nathan Sidwell changed: What|Removed |Added CC||nathan at gcc dot gnu.org --- Comment #2 from Nathan Sidwell --- Created attachment 40587 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40587=edit Simpler testcase nathans@devbig026:423>trunk/obj/x86_64/gcc/cc1plus -Wshadow -quiet -std=c++14 shadow.ii shadow.ii: In instantiation of 'Baz()::[with auto:1 = int]': shadow.ii:5:10: required from 'void Foo(T&&) [with T = Baz():: ]' shadow.ii:10:26: required from here shadow.ii:10:22: warning: declaration of 'ARG' shadows a previous local [-Wshadow] Foo ([] (auto &) {}); ^ shadow.ii:4:7: note: shadowed declaration is here int ARG = 2; ^~~
[Bug c++/67273] Incorrect -Wshadow warning with generic lambdas
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67273 lh_mouse changed: What|Removed |Added CC||lh_mouse at 126 dot com --- Comment #1 from lh_mouse --- Not very sure whether it is related to this one: struct foo { template void iterate(F f){ int i = 1; f(i); } void kick(){ iterate([&](auto i){ }); } }; Replacing `auto` with `int` gets rid of the warning.