This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR c++/60573
- From: Jason Merrill <jason at redhat dot com>
- To: Adam Butcher <adam at jessamine dot co dot uk>
- Cc: gcc-patches at gcc dot gnu dot org, Volker Reichelt <reichelt at gcc dot gnu dot org>
- Date: Wed, 26 Mar 2014 11:17:31 -0400
- Subject: Re: [PATCH] Fix PR c++/60573
- Authentication-results: sourceware.org; auth=none
- References: <1395197167-25367-1-git-send-email-adam at jessamine dot co dot uk> <5331A533 dot 8020806 at redhat dot com> <eff330d2fc16e90b4de9837a19aad45a at imap dot force9 dot net>
On 03/25/2014 03:48 PM, Adam Butcher wrote:
I don't follow. Are you suggesting a case like the following?
struct A
{
struct X
{
struct B
{
void foo(auto);
};
};
void X::B::foo(auto) {} // { dg-error "cannot define" }
};
I meant
struct A
{
struct X
{
struct B
{
void foo(auto);
};
void B::foo(auto) {} // { dg-error "cannot define" }
};
};
Here we push both A and X for the declarator. When we get to the pushed
X, we see that the enclosing scope is A, so we break out of the loop and
don't pop either of the pushed scopes.
Jason