I understand what they are for, I read the manual page The problem is that my (may be slightly out of date) code style falls foul of these warnings for no good reason. They produce warnings on perfectly good code which makes them next to useless for me. Who ever designed them seems to have decided to unilaterally add constraints to their definition of valid C code and I'm not going to waste my time checking and fixing my code just to placate some broken (*) warnings.Paeryn wrote:The -Wmissing-prototypes and -Wmissing-declarations warnings aren't meant as warnings against bad code, they are more for checking that external functions have declarations in header files. If you decided to rename a function in the source code of a library but forgot to rename it in the header file then the compiler would flag it up as the function would no longer have a matching declaration in the header. Just compiling the library wouldn't necessarily pick up on that if the function is never called from within the library itself.
missing-prototypes is for catching when you declare a function without giving a prototype. This will catch cases where you don't provide the function parameters in the header (which missing-declarations won't).
(*) Broken in my case , but I appreciate could be useful for others.