Originally Posted by
matsp
Not so. If you don't have a prototype [at least a basic "return type" declaration - arguments isn't important for the discussion here] on a system that uses different registers for different types [this applies to for exampl floating point returns in FPU registers too], then the compiler will not KNOW that the return value from malloc() is a pointer, and thus assume that it's an integer type operation and use the wrong register. How is the compiler going to know what the return type is if it's not been told - the compiler doesn't KNOW intrinsically that malloc return a pointer. For that matter, if you don't actualy need the malloc function in the C library, you could very well write another function called malloc() that does somethign completely different - the compiler should be able to compile this too.
--
Mats