3 ms·
A warning being thrown for a user which is caused by a bug that leads to mysterious crashes in a codebase which is warning free for the developer is something w
by nullc 5y ago
A warning being thrown for a user which is caused by a bug that leads to mysterious crashes in a codebase which is warning free for the developer is something which is almost unobservably rare. So sure, a user getting a failed compile is superior to a mysterious crash, but that isn't the actual tradeoff in practice.
Instead, if you have a post compile test suite which covers extensively all branches in the code you will catch things like miscompilation that warnings have little chance of catching. And well constructed the tests can have a zero rate of false positives-- which isn't something you'll get from warnings.
So another choice: take the time you'd spend on the sisyphean task of dealing with random failures due to Werror new/old/different toolchains and invest it on making better post compile tests and save the Werror for your CI where its time wastage is more proportional to the benefit it provides.