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]

Re: [C++ PATCH] Fix 4206


Jason Merrill wrote:
> 
> Does this work properly with -fno-for-scope?
Er, yes it appears to do so, here's a couple more test cases

BTW, these fail in the same manner as the original bug report without
the patch.

nathan

-- 
Dr Nathan Sidwell   ::   http://www.codesourcery.com   ::   CodeSourcery LLC
         'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org
// { dg-do compile }
// { dg-options -fno-for-scope }

// Copyright (C) 2001 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 4 Sept 2001 <nathan@codesourcery.com>

// Bug 4206. We were nesting SCOPE_STMTs badly.


struct A
{
  A ();
  ~A ();
};


void Go( )
{
  for (int i = 1;;)
    {
      switch (1) {
      default: {}
      }
      A d;
    }
  i;
}
// { dg-do compile }
// { dg-options -fpermissive }

// Copyright (C) 2001 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 4 Sept 2001 <nathan@codesourcery.com>

// Bug 4206. We were nesting SCOPE_STMTs badly.


struct A
{
  A ();
  ~A ();
};


void Go( )
{
  for (int i = 1;;)	// { dg-warning "using obsolete binding" "" }
    {
      switch (1) {
      default: {}
      }
      A d;
    }
  i;  // { dg-warning "name lookup" "" }
}

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