23 ms·
If they should be treated as errors then how are the different than errors? The only difference between a warning and an error is if it's ignorable to still pr
by BoiledCabbage 3y ago
If they should be treated as errors then how are the different than errors?
The only difference between a warning and an error is if it's ignorable to still proceed to execution. If it isn't it's an error, if it is, it's a warning.
If all warnings should stop builds then they are no longer warnings. And to be clear you can argue that point - that there shouldn't be such a thing as a warning. And that's a fair argument to make (regardless of if I agree or disagre), but saying "the build system should treat all warnings as errors" isn't really coherent.
- ranting-moth 3y agoBecause to the compiler errors are non negotiable. It doesn't understand what you are trying to say. Warning is the compiler saying that yes, he understands but you're probably doing it wrong. Unused variable. Yeah, legal. But why? Most code that generates warnings can be written in a way so it doesn't. For the rare extreme nonsense warning, deactivate that warning with a comment and justification why to the next reader. Because if you don't treat warnings like errors they become just a background din. > ... isn't really coherent. It's supported by many compilers and isn't a new idea.