This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: missed uninitialised variable warning
- From: Laurent GUERBY <guerby at acm dot org>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: Michael Matz <matz at suse dot de>,Gabriel Dos Reis <gdr at integrable-solutions dot net>,Alexandre Oliva <aoliva at redhat dot com>, Andrew Morton <akpm at osdl dot org>,gcc at gcc dot gnu dot org
- Date: Mon, 04 Aug 2003 19:57:08 +0200
- Subject: Re: missed uninitialised variable warning
- References: <87071F48-C68E-11D7-9AF5-000393A6D2F2@physics.uc.edu>
- Reply-to: guerby at acm dot org
On Mon, 2003-08-04 at 17:15, Andrew Pinski wrote:
> On Monday, Aug 4, 2003, at 09:56 US/Eastern, Andrew Pinski wrote:
> > Here is a patch which should warn about more complicated expressions.
> > If you want to limit gcc not warn about int i=i;, then add a condition
> > in contains_exp
> > for the case x==t and change the name of contains_exp.
>
> This patch does not work with anything other than c and C++ because
> walk_tree depends on the c front-end which
> needs to change (and is changed already on the tree-ssa branch).
For Ada at least the construct is illegal so it's
handled by the front-end with the following error message:
p.adb:2:19: object "I" cannot be used before end of its declaration
Don't know for other languages.
Laurent