From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25391 invoked by alias); 19 May 2003 08:32:08 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 16156 invoked by uid 71); 19 May 2003 08:26:01 -0000 Date: Mon, 19 May 2003 08:32:00 -0000 Message-ID: <20030519082601.16155.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Gabriel Dos Reis Subject: Re: c++/10852: Old for-scoping rules improperly used? Reply-To: Gabriel Dos Reis X-SW-Source: 2003-05/txt/msg02057.txt.bz2 List-Id: The following reply was made to PR c++/10852; it has been noted by GNATS. From: Gabriel Dos Reis To: derrick@cco.caltech.edu Cc: gcc-gnats@gcc.gnu.org Subject: Re: c++/10852: Old for-scoping rules improperly used? Date: 19 May 2003 10:15:54 +0200 derrick@cco.caltech.edu writes: | I think this is a bug in g++; but there is always the possibility that it is a bug in my understanding of C++. In the following code gcc assumes that the variable i at the end of function is the same as in the for loop and produces the following error: | nstest.cc: In function `void f()': | nstest.cc:9: error: name lookup of `i' changed for new ISO `for' scoping | nstest.cc:6: error: using obsolete binding at `i' That is a bug in the compiler. The compiler should first look into X before complaining. -- Gaby