enabling optimizations (-Og) with --enable-debug

Ashod Nakashian ashnakash at gmail.com
Fri Jan 16 05:43:59 PST 2015


On Fri, Jan 16, 2015 at 8:21 AM, Norbert Thiebaud <nthiebaud at gmail.com> wrote:
>
> On Fri, Jan 16, 2015 at 4:15 AM, Stephan Bergmann <sbergman at redhat.com> wrote:
> > On 01/15/2015 10:47 PM, Ashod Nakashian wrote:
> >>
> >> It probably is, but with some caveats. My main concern would be
> >> unnecessary code pollution. It's true that these warnings could be
> >> really useful. They might hint at actual issues in some cases (for
> >> example an unhandled error in the unused-result case).
> >> But suppressing them can also muddle the code. I rather 'fix' the cases
> >> that might hide real issues rather than suppress/silence noise just for
> >> its own sake.
> >
> >
> > Our OOo/LO history has shown us that compiler warnings are only helpful for
> > development if they break the build.  Unfortunately, that means that you
> > occasionally need to find a way to work around a false warning unhelpfully
> > emitted by some compiler.

Indeed. This is why having a convenient configure flag for when it's
useful might be a good idea. Otherwise, it's just pure noise (or
worse).

>
> I concur and it is not just LO... with warnings, only a 0-policy makes sens.
> Either we care about them or we do not at all, but selectively caring
> inevitably lead to the forest that hide the tree.
>
> Norbert, who recall -- without any nostalgia - the 1000's of warning
> that used to litter the code few years back...

With -Werror this won't be the case. Your pain is shared by me at least.
However, if -Og helps someone (with a lot of time and patience) to
improve some code, patches sure are welcome.


More information about the LibreOffice mailing list