dotgnu-pnet
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Pnet-developers] [bug #7485] Non-initialized variable in for-loop s


From: Rhys Weatherley
Subject: Re: [Pnet-developers] [bug #7485] Non-initialized variable in for-loop shall not be compiled by cscc
Date: Sun, 5 Jun 2005 19:09:10 +1000
User-agent: KMail/1.4.3

On Sunday 05 June 2005 06:25 pm, Deryk Robosson wrote:

> Rhys, can you offer any ideas or suggestions on this?

Every statement will need to have a list of variables used and set associated 
with it, with dynamic flow analysis used to track the usage.  A flag is 
insufficient.  See the Dragon Book for the gory details.  It ain't pretty, 
especially when statements like break, continue, and goto are encountered.

It would perhaps be possible to add a "check usage" operation in treecc that 
collects up this list information for each node type.  It would take a list 
of variables in, for those that have already been set, and produce a list of 
variables that are set afterwards.  Set merging will need to be done 
everywhere control flow might come in from other points.

Cheers,

Rhys.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]