Hi Tristan,
indeed, for two years already. Is there any reason not to do this for all
functions, rather than just limiting it to builtins?
I don't understand what do you mean. We need to do this implicit conversion
for builtins because they are known by the compiler. Which other functions
(that aren't builtins) are you referring to ?
all of them! First off, the LLVM optimizers do a better job if an argument of a
user defined function that is really a pointer is declared as such, rather than
declared as an integer then cast to a pointer before being used. I don't know
if the GCC optimizers are sensitive to this too. Also, the LLVM optimizers
recognize some standard library functions that the gcc optimizers do not, but
fail to recognize them when called from Ada because they have the wrong
prototype: an integer rather than a pointer argument. Finally I would argue
that as System.Address is really a pointer, playing pretty much exactly the
same role as void* in C, it is more philosophically correct to express it as a
void*. That said, it should probably just be declared as a pointer in the
System package rather than doing all this mucking around in the gcc interface.
Ciao, Duncan.