[1] Normally you have to declare a function as 'static' to tell the compiler that the function isn't being exported form the compilation unit, since the compiler isn't supposed to be able to tell the difference between function declarations in the .c file itself and function declarations that were included from .h files. But in this case the function is just defined and never declared, so I presume that's the same as a static declaration.
However, the compiler is perfectly free to both compile it as an external function and inline it wherever it wants. Yes, setting breakpoints on such a function would be 'funny', but that's nothing of real concern to the compiler.
You can see this by inspecting the disassembly yourself, you'll see that printf never actually calls divide, and yet the divide function is still defined within the executable output.
"Once, I was interested in finding out how a C compiler would handle the div instruction. So, I opened up my editor, and wrote this C program:
I compiled it, and took a look at the generated assembly. How many div instructions do you think it used?[Various guesses, mostly "one."]
The correct answer is "zero." The compiler figured it out at compile time, and put a constant in instead. So, I decided to put it in a function:
Guess what happened next.[Various guesses.]
The f--king compiler optimized it out again!"