[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#43725: 28.0.50; Include feature/native-comp into master
From: |
Andrea Corallo |
Subject: |
bug#43725: 28.0.50; Include feature/native-comp into master |
Date: |
Thu, 18 Feb 2021 20:53:05 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Andrea Corallo <akrl@sdf.org>
>> Cc: Eli Zaretskii <eliz@gnu.org>, larsi@gnus.org, monnier@iro.umontreal.ca,
>> 43725@debbugs.gnu.org
>> Date: Thu, 18 Feb 2021 20:32:06 +0000
>>
>> >> Several comparisons like this one:
>> >>
>> >> + if (val != (long) val)
>> >>
>> >> are IMO better written as
>> >>
>> >> if (val > LONG_MAX || val < LONG_MIN)
>> >
>> > Fixed by 72e4a22391
>>
>> I noticed that with the suggested fix applied in configurations where
>> 'val' can't exceed a long on the positive side GCC (trunk from some time
>> ago) is complaining emitting the following warning:
>>
>> 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.
Hi Eli,
sorry just to make sure I understand the suggestions:
> You can either condition that by WIDE_EMACS_INT,
Put it under #ifdef I guess.
> or add a comparison > between LONG_MAX and INT_MAX.
Not sure I understand how you'd write this.
Thanks
Andrea
- bug#43725: 28.0.50; Include feature/native-comp into master, Eli Zaretskii, 2021/02/13
- bug#43725: 28.0.50; Include feature/native-comp into master, Andrea Corallo, 2021/02/14
- bug#43725: 28.0.50; Include feature/native-comp into master, Andrea Corallo, 2021/02/16
- 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, Eli Zaretskii, 2021/02/18
- bug#43725: 28.0.50; Include feature/native-comp into master,
Andrea Corallo <=
- 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, 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, Eli Zaretskii, 2021/02/20
- 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