Werror (Was: Deferenceing...)
- From: terra gnome org (Morten Welinder)
- To: gtk-devel-list gnome org
- Cc: walters verbum org
- Subject: Werror (Was: Deferenceing...)
- Date: Wed, 28 Apr 2004 10:35:12 -0400 (EDT)
Colin Walters wrote:
> The best way in my opinion is to use -std=c89, along
> with -Wall -Werror and a bunch of other -Wblah flags.
Translation: "Everyone who is not running a machine/compiler/OS that is
completely identical to mine is a dork and deserves not to have things
compile."
-Werror is just plain anti-social behaviour.
Examples:
* Linux has the wrong type for iconv. I could fix various code to
use the right type and have every Linux box' compile break. That
would be fun, right?
* I've got pragmas in system headers. gcc warns on those so nothing
is going to compile with -Werror.
* I run a different gcc version than most other people. The set of
might-be-used-uninitialized warnings is different between versions.
Often one is not a subset of the other, so you can fix for one, but
have to break the other.
* A different optimization level can cause new warnings to appear.
* My pid_t is different from yours. That's painfully obvious when
someone printfs it. Getting such problems fixed in the source can
take years.
* isdigit. ***Sigh*** At least glib nowadays has g_ascii_isdigit
because just getting people to understand that they are calling
isdigit incorrectly is a major task. Warning for me (and in
extreme cases a crash at runtime), but with -Werror no compile.
* "char", is that signed or unsigned?
So please bury -Werror somewhere deep underground where it will not
be found for a few centuries.
Morten
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]