In classic C, you don't need a prototype to call a function. The compiler will output that the function returns int and accepts an unknown number of parameters. This may work on some architectures, but it will fail if the function returns something other than int, like a structure, or if there are any parameter conversions.
In your example, the dream is being watched, and the compiler assumes a prototype, for example
int sleep();
Note that the argument list is empty. In C, this is NOT the same as void. It actually means "unknown." If you are writing K & RC code, you may have unknown parameters using code like
int sleep(t) int t; { }
This is all dangerous, especially on some built-in microcircuits, where parameter parameters for the unprotected function are transmitted, differs from the prototype.
Note: prototypes are not needed for binding. Typically, the linker automatically links to the C runtime library, such as glibc on Linux. The connection between your use of sleep and the code that implements it occurs during the connection long after processing the source code.
I would suggest that you use your compiler function to require prototypes to avoid such problems. With GCC, this is the -Wstrict-prototypes command line argument. In CodeWarrior tools, this was the “Require Prototypes” flag in the C / C ++ Compiler Panel.
Ben combee
source share