- You can't use malloc() without including stdlib.h (or declaring a function named malloc() yourself) in C99 (in full compliance mode anyway I believe).
- If you turn up the warning level on your C89 compiler, you are warned that the function malloc() can't be found and is assumed to return an int.
Casting malloc() is not as disastrous as you may think. Pointless to some perhaps, but it does not violate any standard, and it requires quite a few things to go wrong for you to notice anything odd.
If you forget to include header files, and you aren't compiling with a high warning level, you sort of expert weird bugs, don't you?