简体   繁体   中英

treat “implicit declaration of function foo” as error

GCC gives a warning implicit declaration of function foo when you use foo() before its declaration. Is there any GCC flag that would make treat this warning as error and stop compilation? Sometime it would save you some debugging work...

-Werror will treat all warnings as errors. You can be more specific with -Werror-implicit-function-declaration

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM