Re: git: b8c4bfe660b3 - main - sysutils/reptyr: Address LLVM 13 build failure

From: Alexey Dokuchaev <danfe_at_freebsd.org>
Date: Thu, 02 Dec 2021 05:40:06 UTC
On Wed, Dec 01, 2021 at 09:28:36PM -0800, Don Lewis wrote:
> ...
> In one particular case, I'm working with some really crufty old C code
> that's been abandoned for quite some time.  Compiling it throws tons of
> errors about things that were mentioned favorably in the original K&R C
> book.  The code badly needs cleanup, much of which look like it is
> fairly mechanical, but it would be too easy to introduce bugs and there
> is no test harness that I'm aware of to do a thorough test of the
> updated code.
> 
> Another case is a large C++ project where many of the errors are due to
> an API problem in a base class that is used by many other classes, some
> of which override the problematic method.  Fixing the API issue in the
> base class ripples out to *many* other places and doing an adequate job
> of testing looks like a lot of work.

Naturally, when working with old, unmaintained, or convoluted codebases
one should use their knowledge of these particular circumstances to make
the best judgment.  It is indeed often safer to tune the compiler rather
than patch fragile, warny, but nonetheless working code.  My point here
is, when taking "tame the compiler" approach, not to tranquilize it too
much, as it would stop telling you about the bugs you're *unaware* of.
Having these individual -Wno-... flags are quite handy for that purpose.

./danfe