Treat "implicit function declaration foo" as an error

GCC gives a warning implicit declaration of function foowhen you use it foo()before declaring it. Is there a GCC flag that treats this warning as an error and stops compiling? Someday this will save you some debugging work ...

+5
source share
1 answer

-Werrorwill handle all warnings as errors. You can clarify -Werror-implicit-function-declaration

+8
source

All Articles