This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR c++/60573


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]