https://issues.dlang.org/show_bug.cgi?id=14419

--- Comment #12 from Jens Bauer <[email protected]> ---
(In reply to Ketmar Dark from comment #3)
> alias extern(C) immutable void function () VectorFunc;
> VectorFunc[3] g_pfnVectors = [
>   Reset_Handler,
> ];
> 
> extern(C) void Reset_Handler () {
>   while (true) {}
> }
> 
> there is no sense to evaluate `Reset_Handler`, as it's return value
> (actually, absense of) is not suitable as array element.

There is another detail here, which I just noticed:
In the array, I do not give the function any arguments / parameters.

-Shouldn't that be reported as an error, or is it intended that functions are
callable like this:
a = printf;

... ?

In C, a would be a pointer to the function printf, however in D, a would
contain the result of the execution.

--

Reply via email to