Re: Implementation dependent behaviour (WAS: Re: Programming language and IDE design)

Ivan Godard <ivan@ootbcomp.com>
Fri, 10 Jan 2014 09:11:04 -0800

          From comp.compilers

Related articles
[2 earlier articles]
Re: Implementation dependent behaviour (WAS: Re: Programming language gah@ugcs.caltech.edu (glen herrmannsfeldt) (2013-11-24)
Re: Implementation dependent behaviour (WAS: Re: Programming language kaz@kylheku.com (Kaz Kylheku) (2013-12-17)
Re: Implementation dependent behaviour (WAS: Re: Programming language martin@gkc.org.uk (Martin Ward) (2014-01-06)
Re: Implementation dependent behaviour (WAS: Re: Programming language martin@gkc.org.uk (Martin Ward) (2014-01-06)
Re: Implementation dependent behaviour (WAS: Re: Programming language ivan@ootbcomp.com (Ivan Godard) (2014-01-08)
Re: Implementation dependent behaviour (WAS: Re: Programming language kaz@kylheku.com (Kaz Kylheku) (2014-01-08)
Re: Implementation dependent behaviour (WAS: Re: Programming language ivan@ootbcomp.com (Ivan Godard) (2014-01-10)
Re: Implementation dependent behaviour (WAS: Re: Programming language gah@ugcs.caltech.edu (glen herrmannsfeldt) (2014-01-10)
Re: Implementation dependent behaviour (WAS: Re: Programming language ivan@ootbcomp.com (Ivan Godard) (2014-01-13)
Re: Implementation dependent behaviour (WAS: Re: Programming language anton@mips.complang.tuwien.ac.at (2014-01-14)
| List of all articles for this month |

From: Ivan Godard <ivan@ootbcomp.com>
Newsgroups: comp.compilers
Date: Fri, 10 Jan 2014 09:11:04 -0800
Organization: A noiseless patient Spider
References: 13-11-025 14-01-007 14-01-008
Keywords: arithmetic, standards
Posted-Date: 10 Jan 2014 15:00:33 EST

On 1/8/2014 10:21 AM, Kaz Kylheku wrote:
> On 2014-01-08, Ivan Godard <ivan@ootbcomp.com> wrote:
>> On 11/20/2013 2:29 AM, Martin Ward wrote:
>>
>> <snip>
>>
>>> (2) CPU designers may choose to implement that behaviour in hardware
>>> on the next iteration of the CPU. Now the programs run fast on *all*
>>> CPUs.
>>>
>>> Everybody wins.
>>
>> I am such a CPU designer. We faced the "undefined" issue in our Mill
>> family of general-purpose CPUs (ootbcomp.com). Not only are languages
>> under-constraining, they are also sometimes over-constraining: signed
>> integer overflow is undefined in C but required to wrap in Java.
>
> It's only undefined on paper. In reality, if you don't make it wrap in C like
> in Java, unknown numbers of C programs will break, and not all of them doing it
> by accident.


Or one may say that unknown numbers of C programs are already broken.


And the reality is that the program cannot even in practice depend on
wrapping; see http://www.airs.com/blog/archives/120, or just Google
"signed integer overflow in C".


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.