A function call is cast to void but it already returns void so the cast is pointless.
module fly;
function void foo; endfunction
initial begin
void'(foo());
end
endmodule
module fly;
function void foo; endfunction
initial begin
foo();
end
endmodule