[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: warnings compiling Emacs 22 on amd64
From: |
Kim F. Storm |
Subject: |
Re: warnings compiling Emacs 22 on amd64 |
Date: |
Tue, 16 Jan 2007 09:50:49 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.92 (gnu/linux) |
Richard Stallman <address@hidden> writes:
> I think we should demand some way to turn off the warning in specific
> places. Does GCC have a feature to turn off warnings in a specific
> piece of code? I don't remember. It would be a good feature to have.
>
> However, a specific feature just for this kind of warning would also
> be useful. I have an idea for what it could look like: an extra cast.
>
> if ((int)(short)foo > (int)SHRT_MAX || (int)(short)foo < (int)SHRT_MIN)
>
> (short) would be a way of saying "yes I know this is a short", and
> this could suppress the warning.
>
> What do you think of that feature?
So you would define
#define FIXNUM_OVERFLOW_P(i) \
((EMACS_INT)(i) > MOST_POSITIVE_FIXNUM \
|| (EMACS_INT) (i) < MOST_NEGATIVE_FIXNUM)
as
#define FIXNUM_OVERFLOW_P(i) \
((EMACS_INT)(int)(i) > MOST_POSITIVE_FIXNUM \
|| (EMACS_INT)(int)(i) < MOST_NEGATIVE_FIXNUM)
Looks fine to me.
--
Kim F. Storm <address@hidden> http://www.cua.dk
- Re: warnings compiling Emacs 22 on amd64, (continued)
- Re: warnings compiling Emacs 22 on amd64, Stefan Monnier, 2007/01/14
- Re: warnings compiling Emacs 22 on amd64, Eli Zaretskii, 2007/01/14
- Re: warnings compiling Emacs 22 on amd64, Richard Stallman, 2007/01/15
- Re: warnings compiling Emacs 22 on amd64, Eli Zaretskii, 2007/01/15
- Re: warnings compiling Emacs 22 on amd64, Richard Stallman, 2007/01/16
- Re: warnings compiling Emacs 22 on amd64, Kevin Gallagher, 2007/01/16
- Re: warnings compiling Emacs 22 on amd64, Kim F. Storm, 2007/01/16
- Re: warnings compiling Emacs 22 on amd64, Richard Stallman, 2007/01/16
- Re: warnings compiling Emacs 22 on amd64,
Kim F. Storm <=
- Re: warnings compiling Emacs 22 on amd64, Stefan Monnier, 2007/01/16
- Re: warnings compiling Emacs 22 on amd64, Eli Zaretskii, 2007/01/16
- Re: warnings compiling Emacs 22 on amd64, Richard Stallman, 2007/01/17
- Re: warnings compiling Emacs 22 on amd64, Richard Stallman, 2007/01/16
- Re: warnings compiling Emacs 22 on amd64, Eli Zaretskii, 2007/01/16