guile-devel
[Top][All Lists]
Advanced

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

Re: Fixing num2integral.i.c's warnings (a proposal).


From: Rob Browning
Subject: Re: Fixing num2integral.i.c's warnings (a proposal).
Date: Mon, 24 Sep 2001 17:54:47 -0500
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/20.7

Dirk Herrmann <address@hidden> writes:

> Are you sure about the useless code?  A good compiler should not
> produce any code in such a situation.

Nope.

> Hmmm.  I'm typically much in favor of getting rid of compiler warnings.  
> Normally I use -Wall plus -W when compiling guile - which still gives a
> lot of open warnings, try it!  However, I wonder if it really makes sense
> to remove any warning - no matter what it costs.  As I said above, it
> seems not very likely that a recent compiler will produce dead code.  And,
> just for the benefit of getting rid of these warnings, I feel the above
> scheme will complicate things more than it helps.

I disagree.  These days I always compile after configuring with
--enable-error-on-warning (i.e. -Wall -Werror, minus a few
uninteresting warnings), and as of recently, this file was one of the
only ones causing any trouble.  Further, when I tried to clean up the
alpha and ia64 bugs, this alone enabled me to find nearly every bug
preventing "make check" from working.  I've had similar experiences in
other projects I work on.

Without -Werror, it's too easy for important bugs to just scroll by,
with no one ever seeing them.

I'd also be happy with an approach that allowed us to selectively
disable -Werror for some files, but it doesn't seem like we should
need that.  There should be some way to fix our num2X approach that
avoids the warnings, and isn't too ugly.

Now don't get me wrong, -Werror isn't a substitute for careful coding,
and it's *really* not a substitute for comprehensive checks via "make
check", but my experience has been that it helps.

I don't acutally think that everyone should have to use
--enable-error-on-warning all the time, but I do think it should be
possible for those who want to use it to be able to.

IMO.

-- 
Rob Browning
rlb @defaultvalue.org, @linuxdevel.com, and @debian.org
Previously @cs.utexas.edu
GPG=1C58 8B2C FB5E 3F64 EA5C  64AE 78FE E5FE F0CB A0AD



reply via email to

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