[Issue 11657] New: Pass array literal to typesafe variadic argument on stack
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Dec 1 10:09:14 PST 2013
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: nobody at puremagic.com
ReportedBy: code at dawg.eu
--- Comment #0 from Martin Nowak <code at dawg.eu> 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: -------
More information about the Digitalmars-d-bugs
mailing list