[M3devel] warning for uninitialized variables?

Jay K jay.krell at cornell.edu
Wed Jun 2 17:13:55 CEST 2010


Well, I'm certainly not lobbying hard for that, presumably there is no efficient implementation, esp. for full range integers.

Wikipedia has a nice article. "nice" means "agrees with me".


http://en.wikipedia.org/wiki/Uninitialized_variable
"it is a programming error and a common source of bugs in software."


And then they point out how Java requires mechanically verified initialization of locals.

The code:
void F(bool a)
 int i;
 if (a)
   i = 0;
if (a)
  print(i)


is I believe illegal.


 - Jay


----------------------------------------
> From: hosking at cs.purdue.edu
> Date: Wed, 2 Jun 2010 11:06:23 -0400
> To: jay.krell at cornell.edu
> CC: m3devel at elegosoft.com
> Subject: Re: [M3devel] warning for uninitialized variables?
>
> On 2 Jun 2010, at 10:52, Jay K wrote:
>
>> If we can invest in runtime checks to immediately catch reads of unwritten data, then I'd favor that instead.
>
> YUCK!
>
 		 	   		  


More information about the M3devel mailing list