From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28299 invoked by alias); 29 Apr 2003 14:06:01 -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 28257 invoked by uid 71); 29 Apr 2003 14:06:00 -0000 Resent-Date: 29 Apr 2003 14:06:00 -0000 Resent-Message-ID: <20030429140600.28256.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, invi@your.toilet.ch Received: (qmail 26959 invoked by uid 48); 29 Apr 2003 14:04:14 -0000 Message-Id: <20030429140414.26958.qmail@sources.redhat.com> Date: Tue, 29 Apr 2003 14:06:00 -0000 From: invi@your.toilet.ch Reply-To: invi@your.toilet.ch To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/10539: g++ does not issue a warning on "int a = a + 1" statements. X-SW-Source: 2003-04/txt/msg01339.txt.bz2 List-Id: >Number: 10539 >Category: c++ >Synopsis: g++ does not issue a warning on "int a = a + 1" statements. >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: accepts-illegal >Submitter-Id: net >Arrival-Date: Tue Apr 29 14:06:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Remo Inverardi >Release: g++-3.2.3 >Organization: >Environment: Debian SID >Description: The following code compiles without any warning: void foo() { int a = a + 1; } The variable "a" does not exist in the global name space, which means that the uninitialized local variable "a" is accessed. A warning like "access to uninitialized variable" would be appropriate. >How-To-Repeat: See description. >Fix: >Release-Note: >Audit-Trail: >Unformatted: