Summary: taking address of slice rvalue is valid
           Product: D
           Version: 1.037
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: spec
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]

I was surprised to see that following compiles and generates reasonable code:

int[] a = [1, 2, 3]
auto addr = &a[0..2];

Since the frontend seems to explicitly allow it, it's probably intentional and
we've made LDC behave the same way. Could a description and rationale be added
to the spec?


Reply via email to