This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: missed uninitialised variable warning


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]