"Should functions be made extern in header files? Or are they extern by default?"
Should functions be made extern in header files?
- That is an opinion and differs even among open source.
The reason why I do is simple. If not declared in a header, you can declare that function extern in the file you wish to use it, right before using it.
If you put it in the header file, that will be included from the file in which the function is used.
In that respect, I think it is more correct to have the extern in the header.
However, compilers do that intentionally because there were bad programmers who didn't know any better.
Or are they extern by default?
- Function declarations are implicitly extern by default.