gcc warnings only when there are no errors
Is it possible to tell gcc to show all warnings (like with -Wall) but only if there a开发者_StackOverflow社区re no errors? If there are errors - show only them.
I don't think so. That would require GCC to "cache" all the warnings until it's finished processing the compilation unit, which doesn't sound very useful.
There are utilities like colorgcc that make the output of GCC a bit more obvious in color terminals - maybe you would find that useful?
You could turn all the warnings into errors with -Werror
, thus removing the problem, but that's not what you're after :-)
精彩评论