[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 0/3] yacc: compute the best type for the state number
From: |
Hans Åberg |
Subject: |
Re: [PATCH 0/3] yacc: compute the best type for the state number |
Date: |
Mon, 7 Oct 2019 21:08:03 +0200 |
> On 7 Oct 2019, at 07:15, Akim Demaille <address@hidden> wrote:
>
>> Le 2 oct. 2019 à 15:58, Paul Eggert <address@hidden> a écrit :
>>
>> On 10/1/19 10:27 PM, Akim Demaille wrote:
>>> I don't understand why you shy away from -128 and -32768 though.
>>
>> The C Standard doesn't guarantee support for -128 and -32768. This
>> originally was for ones' complement machines such as the Unisys ClearPath
>> Dorado enterprise servers (still in use via firmware translation to Intel
>> Xeon, and they have a C compiler),
>
> Wow! I was unaware of this. Ain't it this kind of machines that is still in
> use to run ancient COBOL programs? Are they still used in production for
> programs written in C?
The C/C++ compiler is still allowed to use it for optimizations, even though
all current hardware I think use modulo 2^k representations; there is an
example here:
http://blog.llvm.org/2011/05/what-every-c-programmer-should-know.html#signed_overflow
Then this links gives an example how the optimizer can remove an overflow
check, causing a security issue:
http://blog.llvm.org/2011/05/what-every-c-programmer-should-know_14.html
- Re: [PATCH 0/3] yacc: compute the best type for the state number, (continued)
- Re: [PATCH 0/3] yacc: compute the best type for the state number, Kaz Kylheku, 2019/10/01
- Re: [PATCH 0/3] yacc: compute the best type for the state number, Akim Demaille, 2019/10/02
- Re: [PATCH 0/3] yacc: compute the best type for the state number, Kaz Kylheku, 2019/10/02
- Re: [PATCH 0/3] yacc: compute the best type for the state number, Paul Eggert, 2019/10/02
- Re: [PATCH 0/3] yacc: compute the best type for the state number, Akim Demaille, 2019/10/03
- Re: [PATCH 0/3] yacc: compute the best type for the state number, Paul Eggert, 2019/10/03
- Re: [PATCH 0/3] yacc: compute the best type for the state number, Akim Demaille, 2019/10/03
- Re: [PATCH 0/3] yacc: compute the best type for the state number, Akim Demaille, 2019/10/04
- Re: [PATCH 0/3] yacc: compute the best type for the state number, Akim Demaille, 2019/10/05
- Re: [PATCH 0/3] yacc: compute the best type for the state number, Paul Eggert, 2019/10/05
- Re: [PATCH 0/3] yacc: compute the best type for the state number, Akim Demaille, 2019/10/05