DMD 1.039 and 2.023 releases

redsea redsea at 163.com
Wed Jan 7 09:12:44 PST 2009


I'm happy to see Bugzilla 2518(scope(success) not execuate and RAII variable destructor is not called) has been fixed, Great !

I have some questions when I check dstress suite and Bugzilla.

In Bugzilla 99,  according to test case:

int main(){
	int i;
	
label: 
	{
		scope(exit) i++;
		i=3;
	}

	if(i != 4){
		assert(0);
	}

	return 0;
}

You said:

The test case behaves as expected, because labels do not introduce a new scope
when followed by { }.


Then I check the online manual, and found:

labels, scope(), pragma, condition compile(version/debug/static if) would be followed by NonScopeStatement.

It is easy to understand scope/condition compile followed by a NonScopeStatement, 
but what is the meaning of  "Labeled Statements"  + NonScopeStatement ?  

If I understand the rule I would make least mistakes, so can you do some explain for me ?  Thanks.





Walter Bright Wrote:

> Faster long divides!
> 
> http://www.digitalmars.com/d/1.0/changelog.html
> http://ftp.digitalmars.com/dmd.1.039.zip
> 
> 
> 
> http://www.digitalmars.com/d/2.0/changelog.html
> http://ftp.digitalmars.com/dmd.2.023.zip



More information about the Digitalmars-d-announce mailing list