How to find C functions without a prototype?
问题 Company policy dictates that every function in C source code has a prototype. I inherited a project with its own make system (so I cannot test it on gcc or Visual Studio) and found that one of the files has some static functions declared without prototypes. Is there a way (not necessarily with a compiler) to list all functions without prototypes in all .c files? 回答1: gcc has an option to warn you about this: gcc -Wmissing-prototypes You can turn this warning into an error to stop compilation