[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#43725: 28.0.50; Include feature/native-comp into master
From: |
Andy Moreton |
Subject: |
bug#43725: 28.0.50; Include feature/native-comp into master |
Date: |
Fri, 19 Feb 2021 17:33:01 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (windows-nt) |
On Fri 19 Feb 2021, Pip Cet wrote:
> On Fri, Feb 19, 2021 at 2:35 PM Andrea Corallo <akrl@sdf.org> wrote:
>> > On Fri, Feb 19, 2021 at 2:16 PM Andrea Corallo <akrl@sdf.org> wrote:
>> >> >> > comp.c:1174:22: warning: logical ‘or’ of collectively exhaustive
>> >> >> > tests is always true [-Wlogical-op]
>> >> >> > 1174 | if (val > LONG_MAX || val < LONG_MIN)
>> >> >> > | ^~
>> >> >> >
>> >> >> > Not sure what's the best way to silence it or if we want to revert to
>> >> >> > the previous formulation.
>> >> >>
>> >> >> Maybe it's me, but I had a hard time parsing that warning. IIUC, the
>> >> >> tests are both trivially false? And oring two trivially false
>> >> >> conditions shouldn't trigger a warning, should it?
>> >> >
>> >> > No, I think it tries to say that val is always either greater than
>> >> > LONG_MAX or smaller than LONG_MIN.
>> >>
>> >> Exactly, the warning is about the fact that all the other conditions
>> >> will never be evaluated. The phrasing is admittedly quite cryptic tho.
>> >
>> > I thought you said this was a setup where the argument _does_ fit a long?
>>
>> There we are dispatching if 'val' can be expressed or not with a long.
>>
>> 'val' is an EMACS_INT so depending on the configuration it might fit in
>> a long by definition, when this happen GCC sees the first condition in
>> or as always true etc etc... :)
>
> So val is greater than LONG_MAX? How can this happen?
A 32bit emacs configured with "--with-wide-int" where EMACS_INT is wider
than long.
AndyM
- bug#43725: 28.0.50; Include feature/native-comp into master, (continued)
- bug#43725: 28.0.50; Include feature/native-comp into master, Pip Cet, 2021/02/19
- bug#43725: 28.0.50; Include feature/native-comp into master, Eli Zaretskii, 2021/02/19
- bug#43725: 28.0.50; Include feature/native-comp into master, Andrea Corallo, 2021/02/19
- bug#43725: 28.0.50; Include feature/native-comp into master, Pip Cet, 2021/02/19
- bug#43725: 28.0.50; Include feature/native-comp into master, Andrea Corallo, 2021/02/19
- bug#43725: 28.0.50; Include feature/native-comp into master, Eli Zaretskii, 2021/02/19
- bug#43725: 28.0.50; Include feature/native-comp into master, Pip Cet, 2021/02/19
- bug#43725: 28.0.50; Include feature/native-comp into master, Andrea Corallo, 2021/02/19
- bug#43725: 28.0.50; Include feature/native-comp into master,
Andy Moreton <=
bug#43725: 28.0.50; Include feature/native-comp into master, Andrea Corallo, 2021/02/18
bug#43725: 28.0.50; Include feature/native-comp into master, Andrea Corallo, 2021/02/18