Re: signed int overflow
From: Andrew Koenig (ark_at_acm.org)
Date: 09/20/04
- Next message: Jack Klein: "Re: C and only C language has a standard 64 bit integer type ?"
- Previous message: John Harrison: "Re: signed int overflow"
- In reply to: JKop: "Re: signed int overflow"
- Next in thread: Alf P. Steinbach: "Re: signed int overflow"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 20 Sep 2004 15:54:58 GMT
"JKop" <NULL@NULL.NULL> wrote in message
news:Xhx3d.31511$Z14.10302@news.indigo.ie...
> Okay let's say that Standard C++... allows... a program to crash should
> you
> cause a signed int to overflow.
It does.
> Well... what the hell kind of implementation would allow this?! Even if
> one
> does exist, it would have been abandoned 17 years 6 months and 2 days ago.
The kind of implementation that would allow it is the kind of implementation
that would try to detect programmer errors rather than ignoring them.
> Imagine it, boot up WinXP. Open a few documents, play minesweeper, CRASH
> (Opps sorry, this computer is ***, it crashes if signed integers
> overflow).
This kind of argument is often referred to as a "straw man." You take the
claims of the viewpoint you oppose, distort them to make them sound
ridiculous, then claim that they can't be right because they sound
ridiculous.
In practice, it is often far from clear whether it is worse for a program to
crash or to quietly give incorrect or nonsensical results.
> I'm open to further discussion on this... but at the moment it looks like
> I'm going to ignore the directive that signed int overflow is undefined
> behaviour and thus that the program may crash. Come on, it's bull***!
I don't think you're open to further discussion. At least you're not
behaving like you are.
- Next message: Jack Klein: "Re: C and only C language has a standard 64 bit integer type ?"
- Previous message: John Harrison: "Re: signed int overflow"
- In reply to: JKop: "Re: signed int overflow"
- Next in thread: Alf P. Steinbach: "Re: signed int overflow"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]