Sure, but this is too easy. If I have legacy code without prototypes, even ANSI-C will allow this. AFAIK there is neither an absolute requirement for prototypes to be used, nor a remark that the compiler is free to do anything its wants (including producing invalid code) in such cases (a.k.a. Implementation dependent).
Function prototypes in ANSI C are not a requirement, if a function is not declared there is an implicit "int function()" declaration. However if this implicit declaration does not match the function called, then it is "undefined behavior" which means "the compiler is free to do anything its wants (including producing invalid code)" (this is not the same as implementation dependent though). I did not see any maintained C code in the last 10 years which was using implicitly parameter declarations intentionally (and not just because of an unintentionally not included header).
If you have legacy code using malloc implicitly I would suggest to adapt that code. If not possible, you can include the required header in a prefix file without "changing" the original code.
This is not a bug in the compiler but a definition of the ANSI C language.
As I said, prototypes are not required, as in C++. Otherwise, the compiler shall report an error, not a suppressible warning.
:smileyhappy:
C is not a safe language. It's very easy to generate undefined behavior. In C (and to a lesser extend in C++) correct coding is difficult and there are many little traps waiting. In many cases, compilers will just compile incorrect code and not even issue a warning as in this case. If you want to get an error for dangerous things, I'm tempted to say use java :smileyhappy:.
If you really think that it is a compiler bug, I would suggest to lookup the ANSI C standard (or at least the openly available draft for C89) and refer to the paragraph which the compiler does not implement properly. The feeling how the standard should be can be easily misleading.
So here the solution is pretty simple.
Just include the appropriate .h file to have a prototype for the function before you attempt to call it.
Again: Granted, but it's too simple.
[And of course, some team member stumbled upon such an error, because warnings were suppressed...]
Suppressing the implicit parameter declaration warning is a dangerous idea. I would recommend to go in the other direction and make implicit parameter declaration an error instead.
Daniel