-Werror Is not your friend (2017)

In this article, the author discusses their perspective on the use of the -Werror compiler flag, which treats all warnings as errors. The author states that they have a zero-warning policy on their projects and use various static analysis tools to enforce it. They explain that -Werror creates a project dependency on specific toolchain vendors and versions, which can lead to build failures and frustration. The author recommends enforcing zero warnings at the DevOps level without relying on -Werror, as this allows for flexibility with different toolchains. They also suggest selectively promoting certain warnings to errors. The author concludes by acknowledging that -Werror may be suitable for some teams but emphasizes the importance of documenting build dependencies.

https://embeddedartistry.com/blog/2017/05/22/werror-is-not-your-friend/

To top