From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22728 invoked by alias); 9 Mar 2004 16:15:42 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 22720 invoked from network); 9 Mar 2004 16:15:41 -0000 Received: from unknown (HELO barry.mail.mindspring.net) (207.69.200.25) by sources.redhat.com with SMTP; 9 Mar 2004 16:15:41 -0000 Received: from user-119a90a.biz.mindspring.com ([66.149.36.10] helo=berman.michael-chastain.com) by barry.mail.mindspring.net with esmtp (Exim 3.33 #1) id 1B0jtL-0006Oe-00; Tue, 09 Mar 2004 11:15:39 -0500 Received: by berman.michael-chastain.com (Postfix, from userid 502) id 9FBF54B104; Tue, 9 Mar 2004 11:15:07 -0500 (EST) To: gdb-patches@sources.redhat.com, vinschen@redhat.com Subject: Re: [RFC/RFA] gdb.cp/classes.exp: Don't try to print local variable out of scope Message-Id: <20040309161507.9FBF54B104@berman.michael-chastain.com> Date: Fri, 19 Mar 2004 00:09:00 -0000 From: mec.gnu@mindspring.com (Michael Elizabeth Chastain) X-SW-Source: 2004-03/txt/msg00199.txt.bz2 1 void foo () 2 { 3 int i = 1; 4 { 5 int i = 2; 6 bar(i); 7 } 8 bar (i); 9 } cv> Is line 7 still in the scope of the inner definition of variable `i'? cv> Which `i' should be printed at that point? My intuition says that the inner "i" is in scope at line 7. That means my intutition is faulty. :( > I tested the whole gdb.cp testsuite on linux-x-sh with and without the > patch and the only difference in the testsuite output where the tests > directly affected by this change: I still want to add a copyright notice to misc.cc, and then clone the file, and then make the change only in classes.cc. I think it's a bit better for every test script to have a dedicated unique test program. Michael C From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22728 invoked by alias); 9 Mar 2004 16:15:42 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 22720 invoked from network); 9 Mar 2004 16:15:41 -0000 Received: from unknown (HELO barry.mail.mindspring.net) (207.69.200.25) by sources.redhat.com with SMTP; 9 Mar 2004 16:15:41 -0000 Received: from user-119a90a.biz.mindspring.com ([66.149.36.10] helo=berman.michael-chastain.com) by barry.mail.mindspring.net with esmtp (Exim 3.33 #1) id 1B0jtL-0006Oe-00; Tue, 09 Mar 2004 11:15:39 -0500 Received: by berman.michael-chastain.com (Postfix, from userid 502) id 9FBF54B104; Tue, 9 Mar 2004 11:15:07 -0500 (EST) To: gdb-patches@sources.redhat.com, vinschen@redhat.com Subject: Re: [RFC/RFA] gdb.cp/classes.exp: Don't try to print local variable out of scope Message-ID: <20040309161507.9FBF54B104@berman.michael-chastain.com> Date: Tue, 09 Mar 2004 16:15:00 -0000 From: mec.gnu@mindspring.com (Michael Elizabeth Chastain) X-SW-Source: 2004-03.o/txt/msg00199.txt Message-ID: <20040309161500.HW_p8Em6tChGxoNVjI98Wmwix6ujZAx3vCFmLB7PMCs@z> 1 void foo () 2 { 3 int i = 1; 4 { 5 int i = 2; 6 bar(i); 7 } 8 bar (i); 9 } cv> Is line 7 still in the scope of the inner definition of variable `i'? cv> Which `i' should be printed at that point? My intuition says that the inner "i" is in scope at line 7. That means my intutition is faulty. :( > I tested the whole gdb.cp testsuite on linux-x-sh with and without the > patch and the only difference in the testsuite output where the tests > directly affected by this change: I still want to add a copyright notice to misc.cc, and then clone the file, and then make the change only in classes.cc. I think it's a bit better for every test script to have a dedicated unique test program. Michael C