4 ms·
That's a feature! New warnings added to new compiler versions can identify problems that weren't previously detected. You _want_ those to -Werror when they ha
by __d 3y ago
That's a feature!
New warnings added to new compiler versions can identify problems that weren't previously detected. You _want_ those to -Werror when they happen, so you can fix them if they need it.
Changing a compiler version is a task that has to be resourced appropriately. Part of that is dealing with any fallout like this. Randomly updating your compiler is just asking for trouble.
- adastra22 3y agoIt is certainly not a feature because it make all infrastructure including just regular old checkout-and-build workflows break for historical versions of the code. It’s so annoying to have to checkout an older version and then have to go disable -Wall -Werror everywhere just to get the damn thing to build. Keep master clean of any warnings, for sure. But don’t put it straight into the build system defaults.
- ordu 3y agoJust updating a compiler could break workflows for historical versions of the code. It is unavoidable. But it is easier with build flags if you use VCS: these flags could be different for different versions.
- __float 3y agoIf you store the compiler version in source control, then you don't have this problem.
- __d 3y agoOld code built with a different compiler isn't something that should be just dropped into production. If you want to do this, you should version the build infrastructure as well as the code. Otherwise, it's important to look at the new warnings: they might reflect changes in the generated code. Putting -Werror in your default build settings makes sure this happens before something blows up in prod.