Is this possible to easily get the number of warnings and errors during a build with gcc
?
My current solution (which is ugly) is:
gcc foo.c 2>&1 | grep warning: | wc
gcc foo.c 2>&1 | grep error: | wc
Is there a better approach, a switch/option/flag to use?