emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: warnings compiling Emacs 22 on amd64


From: Eli Zaretskii
Subject: Re: warnings compiling Emacs 22 on amd64
Date: Tue, 12 Dec 2006 06:24:29 +0200

> Cc: Francesco Potorti` <address@hidden>,  address@hidden
> From: Stefan Monnier <address@hidden>
> Date: Mon, 11 Dec 2006 17:52:44 -0500
> 
> If the argument i is of type int (32bit), then the compiler is sufficiently
> clever to infer that the comparisons will always return the same value
> (even though we cast that value to EMACS_INT (64bit) in between).

Is it really that smart?  Will it also be that smart if we do some
arithmetics, like `(EMACS_INT)i + 0L' or `(EMACS_INT)i*1L'?

> > If FIXNUM_OVERFLOW_P should always return zero on 64-bit machines,
> 
> It shouldn't.  There are a few sites where it does, tho.

Are these few cases those for which the argument of FIXNUM_OVERFLOW_P
is an int (rather than a long)?

> > Does this fix the problem?
> 
> What problem?

The warning messages.

> There is no problem other than unhelpful warnings.
> The warnings basically say "hey guys, I found an optimization opportunity"
> and we're very happy that gcc does the optimization: it saves us from trying
> to write ugly and brittle code such as the one above.  Too bad gcc is a bit
> noisy in this case.  We can probably remove those warnings with the
> right -Wno-foo invocation.

I don't think we want to remove this warning in general with -W-no-*
because it could point out bugs, and I don't think we like to see
warnings where the code is correct.  You are free to think otherwise,
of course, but please let us try to resolve that anyway.




reply via email to

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