From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29718 invoked by alias); 14 Dec 2004 17:00:14 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 28899 invoked from network); 14 Dec 2004 17:00:03 -0000 Received: from unknown (HELO mail.codesourcery.com) (65.74.133.9) by sourceware.org with SMTP; 14 Dec 2004 17:00:03 -0000 Received: (qmail 7962 invoked from network); 14 Dec 2004 17:00:03 -0000 Received: from localhost (HELO ?192.168.189.167?) (nathan@127.0.0.1) by mail.codesourcery.com with SMTP; 14 Dec 2004 17:00:03 -0000 Message-ID: <41BF1C0A.6060100@codesourcery.com> Date: Tue, 14 Dec 2004 17:00:00 -0000 From: Nathan Sidwell Organization: Codesourcery LLC User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 MIME-Version: 1.0 To: Dmitry Antipov CC: gcc@gcc.gnu.org Subject: Re: Dubious "'foo' might be used uninitialized in this function" message References: <41BF1207.2040102@dev.rtsoft.ru> In-Reply-To: <41BF1207.2040102@dev.rtsoft.ru> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-12/txt/msg00514.txt.bz2 Dmitry Antipov wrote: > w.c: In function `f': > w.c:5: warning: 'z' might be used uninitialized in this function > > which is not true. 'tis true too, just here. return x + y + z; read the documentation for -Wuninitialized, which will explain why it can't get all the cases correct. > Is it reasonable to learn GCC do more analysis in attempt to avoid > warning in this case ? How is it complex ? it gets as complex as the halting problem :) nathan -- Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk