APL\360

David Barto david at kdbarto.org
Fri Jan 29 16:42:04 CST 2021



> On Jan 29, 2021, at 2:08 PM, Fred Cisin via cctalk <cctalk at classiccmp.org> wrote:
> 
> On Fri, 29 Jan 2021, wrcooke at wrcooke.net wrote:
>> Modern Visual Studio and GCC both flag the "=" in a condition, I believe.  But if you're shipping code with 260+ warnings, who would see one more.
> 
> In some cases, it is possible to put in preprocessor directives to alert the compiler that you are aware of it, and to NOT generate the WARNING.
> Or, in many cases to modify the code, such as EXPLICIT typedefs to not generate warnings.
> int X = PI;   /* should give a warning */
> int x = (int)PI; /* should be OK, without a loss of efficiency */
> 
> 
> It's scary that code gets shipped as soon as it "seems to be working", without confirming that ALL of the 260+ WARNINGS are deliberately over-ridden.
> 

Whenever I start a new job the first thing I do today is enable -Werror; all warnings are errors. And I’ll fix every one. Even when everyone claims that “These are not a problem”. Before that existed, I’d do the same with lint, and FlexeLint when I could get it.

And in every case, every single time I did this, for some reason the various “mysterious crash” problems would go away. Every time. But it couldn’t be those warnings, they weren’t the problem.

	David


More information about the cctalk mailing list