This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Dubious "'foo' might be used uninitialized in this function"message
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Dmitry Antipov <antipov at dev dot rtsoft dot ru>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 14 Dec 2004 16:59:54 +0000
- Subject: Re: Dubious "'foo' might be used uninitialized in this function"message
- Organization: Codesourcery LLC
- References: <41BF1207.2040102@dev.rtsoft.ru>
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