lilypond-devel
[Top][All Lists]
Advanced

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

Re: lily: fix some type conversion warnings (issue 557190043 by address@


From: Dan Eble
Subject: Re: lily: fix some type conversion warnings (issue 557190043 by address@hidden)
Date: Sun, 2 Feb 2020 09:41:46 -0500

On Feb 2, 2020, at 09:15, address@hidden wrote:
> 
>> I don't like this methodology, what's the difference over disabling
>> -Wconversion
> 
> My selfish is reason is that it gets the warnings out of the way of
> whomever is not interested in fixing casts, including myself.

About 1/3 of the remaining warnings are for conversions between integer and 
floating point types.  Those are most likely to be solved with static_cast<> in 
the long term, so I would have no objection if you approached _those_ that way.

(I encourage static_cast<> over C-style casts because static_cast is easier to 
grep for and the compiler is not so see-no-evil about it.)

> If the base compile is free of warnings, we can add -Werror to the
> compile, and any new errors will cause a failure in our CI, which is a
> much better way of preventing regressions.

This is an idea I can back.  I recall that g++ supports something like -Werror 
-Wwarning=conversion (don't have time to check) that would allow treating most 
warnings as errors right now.

I do have a reservation when it comes to supporting many versions of compiler.  
I've been in the position of having to deal with false positive warnings from 
older compilers that were not well covered in CI.  It was a drag.
-— 
Dan




reply via email to

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