Re: [PATCH][4.6] detect C++ errors to fix 2288 and 18770

2011-05-26 Thread Jason Merrill
OK for 4.7. Jason

Re: [PATCH][4.6] detect C++ errors to fix 2288 and 18770

2011-05-26 Thread Peter Bergner
On Wed, 2011-05-25 at 21:24 -0400, Nathan Froyd wrote: > On Wed, May 25, 2011 at 03:22:07PM -0400, Nathan Froyd wrote: > > The patch just requires some shuffling of logic to catch issues now; > > below is a version that works for me on the trunk. > > > > This new checking does require modifying g+

Re: [PATCH][4.6] detect C++ errors to fix 2288 and 18770

2011-05-25 Thread Nathan Froyd
On Wed, May 25, 2011 at 03:22:07PM -0400, Nathan Froyd wrote: > The patch just requires some shuffling of logic to catch issues now; > below is a version that works for me on the trunk. > > This new checking does require modifying g++.dg/cpp0x/range-for5.C. > > Tested with g++ testsuite on x86_64

Re: [PATCH][4.6] detect C++ errors to fix 2288 and 18770

2011-05-25 Thread Nathan Froyd
On Sun, May 22, 2011 at 03:25:41PM -0700, H.J. Lu wrote: > FWIW, I tried Janis's patch on 4.6 branch and I got > > /export/gnu/import/git/gcc/gcc/testsuite/g++.dg/parse/pr18770.C: In > function 'void e1()':^M > /export/gnu/import/git/gcc/gcc/testsuite/g++.dg/parse/pr18770.C:29:11: > error: redecla

Re: [PATCH][4.6] detect C++ errors to fix 2288 and 18770

2011-05-22 Thread H.J. Lu
On Sun, May 22, 2011 at 2:29 PM, Gerald Pfeifer wrote: > On Sun, 22 May 2011, Jack Howarth wrote: >>> 2010-03-18  Janis Johnson   >>> >>> gcc/cp >>>      PR c++/2288 >>>      PR c++/18770 >>>      * name-lookup.h (enum scope_kind): Add sk_cond. >>>      * name-lookup.c (pushdecl_maybe_friend): Get

Re: [PATCH][4.6] detect C++ errors to fix 2288 and 18770

2011-05-22 Thread Gerald Pfeifer
On Sun, 22 May 2011, Jack Howarth wrote: >> 2010-03-18 Janis Johnson >> >> gcc/cp >> PR c++/2288 >> PR c++/18770 >> * name-lookup.h (enum scope_kind): Add sk_cond. >> * name-lookup.c (pushdecl_maybe_friend): Get scope of shadowed local. >> Detect and report error for re

Re: [PATCH][4.6] detect C++ errors to fix 2288 and 18770

2011-05-22 Thread Jack Howarth
On Thu, Mar 18, 2010 at 01:50:54PM -0700, Janis Johnson wrote: > The ISO C++ standard says, in Section 3.3.2 sentence 4, that a name > declared in the for-init-statement or in the condition of an if, for > while, or switch statement can't be redeclared in the outermost block > of the controlled sta