lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -Werror


From: Han-Wen Nienhuys
Subject: Re: -Werror
Date: Wed, 17 Jun 2020 23:18:02 +0200

On Mon, Jun 15, 2020 at 2:43 PM Jonas Hahnfeld <hahnjo@hahnjo.de> wrote:
>
> Am Montag, den 15.06.2020, 07:50 -0400 schrieb Dan Eble:
> > Han-Wen proposed building with -Werror in a merge request.  What do you 
> > think?
> >
> > I like -Werror, but I've only ever used it where there were very few (or 
> > one) supported build environments, all of which were covered in CI.  A 
> > dimension of the CI coverage was optimization level, which can change what 
> > the compiler discovers.
> >
> > We don't have that here, so we might regret turning warnings into errors 
> > all at once.  How about we turn particular warnings into errors, starting 
> > with narrowing conversions and printf formatting, and wait to see if anyone 
> > reports problems?  (Am I being too conservative?)
>
> As I'm not sure what this proposal is about, I'd like to express that
> I'm not a fan of enabling -Werror in the default configuration. That's
> a pain when using a newer compiler, and you'll eventually get there
> when bisecting an old bug.
>
> I'm much more in favor of enabling -Werror in CI because the setting is
> pretty fixed. However this assumes that the compiler in Ubuntu 16.04
> doesn't throw stupid warnings that we don't want to fix, and it makes
> future upgrades of the CI system a bigger pain than without. Not
> necessarily bad to fix warnings for the newer compiler version, but
> could be daunting.

My proposal is to use -Werror only in CI, so we can keep code free of warnings.

For CI upgrades, we could adapt the flags to switch off individual
warnings that trigger newly after an upgrade (we already do this for
-Wsequence-point, for example.)

-- 
Han-Wen Nienhuys - hanwenn@gmail.com - http://www.xs4all.nl/~hanwen



reply via email to

[Prev in Thread] Current Thread [Next in Thread]