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

Re: addition of -Wall to default flags (redhat-rpm-config-8.0.38-1)

Nicholas Miell wrote:
> I'd argue that any upstream package which includes -Werror by default is
> broken, considering how often gcc warnings change. 

And I argue that we apparently must come to a state where -Werror is
enabled automatically.  The current state, aggravated by adding -Wall,
is that warnings are ignored.  The result: bugs the compiler finds are
no fixed.  I even found one case where the _FORTIFY_SOURCE magic found a
buffer overflow and the maintainer hasn't seen it.

It is crucial that packages are changed to have zero warnings.
Otherwise these bugs remain unnoticed since people think warnings are OK
and don't care.   The "apparent" part is that using -Werror is the only
way to do this.  Without enforcement people _think_ there are more
important things to do than fixing warnings.

Yes, it might mean that an update to a new gcc version means required
changes.  But guess what?  Whenever a warning pops up there is likely a
good reason for it and it is worthwhile spending time on it.  Just like
all these signed vs unsigned warnings in gcc 4.  They almost all the
time warrant looking at the code.

➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖

Attachment: signature.asc
Description: OpenPGP digital signature

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