Slice expressions - exact evaluation order, dollar

Timon Gehr via Digitalmars-d digitalmars-d at puremagic.com
Sat Jun 25 18:30:14 PDT 2016


On 17.06.2016 21:59, kinke wrote:
>
> Most interesting IMO though is the question when the slicee's pointer is
> to be loaded. This is only relevant if the base is an lvalue and may
> therefore be modified when evaluating the bound expressions. Should the
> returned slice be based on the slicee's buffer before or after
> evaluating the bounds expressions?
> This has been triggered by
> https://github.com/ldc-developers/ldc/issues/1433 as LDC loads the
> pointer before evaluating the bounds.

Evaluation order should be strictly left-to-right. DMD and GDC get it 
wrong here.



More information about the Digitalmars-d mailing list