Hello, Ben
> This may be more related to gcc, but we're wondering why the initial
> call to a function without a prototype contained a bitcast while a
> function with a prototype does not. We can go into the code and add
> prototypes and get around the problem, but we'd like to better
> understand what's going on to see if a better solution exists.
This is correct behaviour per C standard.
You have function declared implicitly, thus its type is i32 (...)*
(variadic function returning int). However during call you're having
function with some well-defined function type, thus such bitcast is
needed.
--
With best regards, Anton Korobeynikov.
Faculty of Mathematics & Mechanics, Saint Petersburg State University.