DMD 1.039 and 2.023 releases

Walter Bright newshound1 at digitalmars.com
Wed Jan 7 12:47:58 PST 2009


redsea wrote:
> 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 ?

A NonScopeStatement is a statement that, even if it has { }, does not 
introduce a new scope.

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


More information about the Digitalmars-d-announce mailing list