From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12472 invoked by alias); 10 Oct 2002 11:56:02 -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 12453 invoked by uid 71); 10 Oct 2002 11:56:01 -0000 Resent-Date: 10 Oct 2002 11:56:01 -0000 Resent-Message-ID: <20021010115601.12452.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, riteshg@pune.tcs.co.in Received: (qmail 8070 invoked by uid 61); 10 Oct 2002 11:50:39 -0000 Message-Id: <20021010115039.8069.qmail@sources.redhat.com> Date: Thu, 10 Oct 2002 04:56:00 -0000 From: riteshg@pune.tcs.co.in Reply-To: riteshg@pune.tcs.co.in To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/8184: undefined variable gcc3.0 X-SW-Source: 2002-10/txt/msg00361.txt.bz2 List-Id: >Number: 8184 >Category: c++ >Synopsis: undefined variable gcc3.0 >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Thu Oct 10 04:56:00 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Ritesh goel >Release: 3.0 >Organization: >Environment: >Description: gcc is allowing the usage of variable outside the scope of if stmt, if that variable is defined inside the condition expression of that if stmt and used as th first token after the scope of that if stmt . as in eg. void func() { if ( int i = 9) { // } i = 8; } this should be an error but gcc is allowing i am using gcc3.0 >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: