[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Preventing warnings in FIXNUM_OVERFLOW_P
From: |
Eli Zaretskii |
Subject: |
Re: Preventing warnings in FIXNUM_OVERFLOW_P |
Date: |
Fri, 19 Jan 2007 13:50:00 +0200 |
> From: Richard Stallman <address@hidden>
> Date: Fri, 19 Jan 2007 05:42:53 -0500
> Cc: address@hidden
>
> Eli's current workaround is still the least bad I've seen.
>
> A GCC developer says that the warning does not happen for unsigned
> types. That means that even if GCC gets smarter, it won't give that
> warning if we use an unsigned type.
But this modification of the macro causes it to look suspicious, as it
compares an unsigned variable with a signed (and negative) number. I
don't think it's a good idea to modify our code to the point that an
experienced C programmer (such as me and you) can no longer be sure
that the code is correct.
By contrast, my workaround doesn't obfuscate the code, and the
extra assignment should be optimized out of existence under -O2.
I say let's leave my workaround alone until the GCC developers move
this warning into -Wextra. When that version of GCC becomes
widespread, we can remove the workaround.
- Preventing warnings in FIXNUM_OVERFLOW_P, Richard Stallman, 2007/01/18
- Re: Preventing warnings in FIXNUM_OVERFLOW_P, David Kastrup, 2007/01/18
- Re: Preventing warnings in FIXNUM_OVERFLOW_P, Stefan Monnier, 2007/01/18
- Re: Preventing warnings in FIXNUM_OVERFLOW_P, Richard Stallman, 2007/01/19
- Re: Preventing warnings in FIXNUM_OVERFLOW_P,
Eli Zaretskii <=
- Re: Preventing warnings in FIXNUM_OVERFLOW_P, Stefan Monnier, 2007/01/19
- Re: Preventing warnings in FIXNUM_OVERFLOW_P, Richard Stallman, 2007/01/19
- Re: Preventing warnings in FIXNUM_OVERFLOW_P, Eli Zaretskii, 2007/01/20
- Re: Preventing warnings in FIXNUM_OVERFLOW_P, Richard Stallman, 2007/01/21
Re: Preventing warnings in FIXNUM_OVERFLOW_P, Richard Stallman, 2007/01/19
Re: Preventing warnings in FIXNUM_OVERFLOW_P, Eli Zaretskii, 2007/01/18