November 05, 2010
(2010/11/04 3:59), Steve Schveighoffer wrote:
>
> ----- Original Message ----
>> From: SHOO<zan77137 at nifty.com>
>>
>> (2010/11/03 2:47), Michel Fortin wrote:
>>> In  first and second examples, you're taking the address of a local variable.
>> This  is forbidden in @safe code, so I consider this already solved.
>>
>> I don't  think so.
>> @safe code cannot forbid to bring out the  address:
>> http://ideone.com/rMl5i
>
> I believe the plan is for @safe to prevent you from taking the address of any stack data.  But I don't know if that is formalized.  Surely, that code should be disabled by @safe, because the compiler can deduce the variable escapes its scope.
>
> -Steve

Though I do not so know a lot, is not the analysis kind to a compiler?

BTW, there is not ref storage class data now. Can not this achieve the role?

--
SHOO
1 2 3 4 5
Next ›   Last »