https://d.puremagic.com/issues/show_bug.cgi?id=11657

           Summary: Pass array literal to typesafe variadic argument on
                    stack
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from Martin Nowak <[email protected]> 2013-12-01 10:09:12 PST ---
cat > enh.d << CODE
void foo(int[] ary...)
{
}

void bar()
{
    foo([1, 2, 3, 4]);
}
CODE

Currently this allocates a temporary array on the heap.
But because it's not allowed to escape variadic arguments, they array can be
passed on the stack.

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

Reply via email to