| Summary: | lambda capture shadowing parameter & decltype confusion | ||
|---|---|---|---|
| Product: | gcc | Reporter: | Nathan Sidwell <nathan> |
| Component: | c++ | Assignee: | Ville Voutilainen <ville.voutilainen> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | daniel.kruegler, ville.voutilainen, webrown.cpp |
| Priority: | P3 | Keywords: | accepts-invalid, c++-lambda |
| Version: | 7.0 | ||
| Target Milestone: | 9.0 | ||
| Host: | Target: | ||
| Build: | Known to work: | ||
| Known to fail: | Last reconfirmed: | 2018-04-24 00:00:00 | |
| Bug Depends on: | |||
| Bug Blocks: | 54367 | ||
| Attachments: | reproducer | ||
|
Description
Nathan Sidwell
2017-01-18 15:33:54 UTC
Related: http://stackoverflow.com/questions/42088015 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57443 Core DR 2211 makes this ill-formed, so it should be rejected. *** Bug 57443 has been marked as a duplicate of this bug. *** CCing Ville as he reported the core issue and had assigned the PR 57443 dup to himself. *** Bug 86361 has been marked as a duplicate of this bug. *** Author: ville Date: Tue Aug 7 13:46:16 2018 New Revision: 263357 URL: https://gcc.gnu.org/viewcvs?rev=263357&root=gcc&view=rev Log: PR c++/79133 gcc/cp/ PR c++/79133 * name-lookup.c (check_local_shadow): Reject captures and parameters with the same name. testsuite/ PR c++/79133 * g++.dg/cpp0x/lambda/lambda-shadow3.C: New. * g++.dg/cpp1y/lambda-generic-variadic18.C: Likewise. Added: trunk/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-shadow3.C trunk/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic18.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/name-lookup.c Fixed. |