On 04/27/2013 07:29 AM, Steven Schveighoffer wrote:
On Fri, 26 Apr 2013 07:58:34 -0700, Luís Marques <luismarq...@gmail.com>
wrote:
Should this be supported?
double[8] foo = [1.0, 2.0, void, 3.0, 3.5, void, void, void];
(it's not supported at the moment)
Have you considered what this does? Consider a standard [1.0, 2.0] call:
In essence, it pushes 1.0 and 2.0 onto the stack, then calls a function
to allocate the memory and use the given data.
What will end up happening is the data is copied from the stack to the
heap. It's just in your case, the data copied is garbage. I see little
point in supporting this.
-Steve
(This is a DMD performance bug.)