DevHeads.net

-Werror (or any alternatives in different languages)

Hash: SHA256

Hello,

- From time to time I see upstreams using -Werror (or, #[deny(warnings)] in Rust)
which is definitely causing problems when gcc or any other compiler adds new
warnings. Unfortunately, some upstreams reject removing -Werror and use it just
for specific warnings.

I'm thinking about passing --cap-lints warnings to rustc to prevent erroring on
this (and just show warning). Should we do same for C/C++? Or should I
reconsider decision in Rust land?

Comments

Re: -Werror (or any alternatives in different languages)

By Colin Walters at 02/10/2018 - 16:05

<a href="https://mail.gnome.org/archives/desktop-devel-list/2012-July/msg00100.html" title="https://mail.gnome.org/archives/desktop-devel-list/2012-July/msg00100.html">https://mail.gnome.org/archives/desktop-devel-list/2012-July/msg00100.html</a>

This approach is used in e.g.:
<a href="https://github.com/ostreedev/ostree/blob/5848de93a4346ad3c49d907ced7612578781f5e8/configure.ac#L32" title="https://github.com/ostreedev/ostree/blob/5848de93a4346ad3c49d907ced7612578781f5e8/configure.ac#L32">https://github.com/ostreedev/ostree/blob/5848de93a4346ad3c49d907ced76125...</a>
<a href="https://github.com/systemd/systemd/blob/b8e2400586452499131ff5ab1edb60c1dfbcf92b/meson.build#L290" title="https://github.com/systemd/systemd/blob/b8e2400586452499131ff5ab1edb60c1dfbcf92b/meson.build#L290">https://github.com/systemd/systemd/blob/b8e2400586452499131ff5ab1edb60c1...</a>

Re: -Werror (or any alternatives in different languages)

By Igor Gnatenko at 02/10/2018 - 16:18

Hash: SHA256

On Sat, 2018-02-10 at 15:05 -0500, Colin Walters wrote:
I totally agree with Colin here!

Note that 2 linked cases list -Werror=xxx rather than -Werror.