It would be useful to have a way to dump the warnings from a compilation to a file, and seemingly the most natural way to do that would be to extend with
The use case is that developers often want to develop and debug without worrying so much about warnings, but should almost always resolve the warnings before committing. If you build with
-Werror that impedes development. If you don't build with
-Werror then you may check in code that later fails continuous integration tests, or have to do a clean build to get the warnings out. An alternative workflow would be to always dump warnings to a file, then before commit have a script to quickly check if any of the files are non-empty.