[Issue 3990] Deferencing a dynamic array as pointer

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Oct 31 04:31:37 PDT 2011


http://d.puremagic.com/issues/show_bug.cgi?id=3990



--- Comment #3 from Kenji Hara <k.hara.pg at gmail.com> 2011-10-31 04:30:21 PDT ---
(In reply to comment #0)

1.
>    assert(*a1 == 5);
>    alias typeof(a1) T1;
>    assert(is(typeof(*T1)));

Dereferencing dynamic or static array without -d option is deprecated.
I think this is 'accepts-invalid'.

2.
>    int* p1 = cast(int*)a1;
>    assert(p1 == a1.ptr);

Explicit casting is still valid.

  cast(int*)a1

means

  cast(int*)a1.ptr

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list