[Issue 10858] CTFE wrong code for comparison of array of pointers

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Sep 5 23:24:29 PDT 2013


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


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[CTFE] null pointer assert  |CTFE wrong code for
                   |error                       |comparison of array of
                   |                            |pointers


--- Comment #1 from Don <clugdbug at yahoo.com.au> 2013-09-05 23:24:28 PDT ---
This is a horrible wrong-code bug, nothing to do with 'new'. The bug is in ==.
The pointer doesn't need to be null.
Reduced test case:

bool bug10858()
{
    int *[4] x;
    x[0] = null;
    assert(x[0] == null);
    return true;
}
static assert(bug10858());

-- 
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