3 ms·
I think gating pull-requests on -Werror makes sense, at least for your own code. That way you keep the development branch warning free on the current compiler v
by CodesInChaos 5y ago
I think gating pull-requests on -Werror makes sense, at least for your own code. That way you keep the development branch warning free on the current compiler version. (An override for backported fixes and other exception cases is still a good idea)
But I would not use -Werror when building existing releases, so you can still build old versions of your code using newer compilers.
This article seems to only consider the pull-request scenario when talking about -Werror being fine, while the open-source people opposing -Werror are mostly concerned with building existing releases.
For example rust's stability guarantees do not cover new warnings, so your code can stop building when upgrading the compiler if you use its -Werror equivalent.