Article View: comp.std.c
Article #4598Re: Undefined result vs. int's holding undefined values.
From: Larry Jones
Date: Tue, 09 Jan 1996 19:58
Date: Tue, 09 Jan 1996 19:58
21 lines
1700 bytes
1700 bytes
In article <4cpv1n$apm@der.twinsun.com>, eggert@twinsun.com (Paul Eggert) writes: > Since this is comp.std.c, I'll mention that the (x + y < x) != (y < 0) method > and Daniel Wood's example both port to any C implementation > claiming conformance to LIA-1 (ISO/IEC 10967-1:1994(E), > `Information technology -- Language independent arithmetic -- Part 1: > Integer floating point arithmetic' <ftp://crl.dec.com/pub/misc/lia-1-dis.ps.Z>) > if INT_MODULO is true (which is the only plausible value for INT_MODULO > for real-world C compilers). The current thinking about binding LIA-1 to C allows signed and unsiged integers to have different behavior. Whilst unsigned integers *have* to be MODULO for standard conformance, there is no good reason for signed integers to be the same (other than that many existing machine architectures make it very inconvenient to have them be different). Some (many?) people think that raising an exception of some kind for signed integer overflow is very desirable, rather than allowing the answer to quietly wrap around. ---- Larry Jones, SDRC, 2000 Eastman Dr., Milford, OH 45150-2789 513-576-2070 larry.jones@sdrc.com Some people just don't have inquisitive minds. -- Calvin
Technical Details
Message-ID:
<4cuhdu$ff2@info1.sdrc.com>Path:
arc1-ca.pugleaf.net!sdrc.com!thor!scjonesReferences:
<4ck70b$rd7@news.informix.com> <4ckms5$rd7@news.informix.com> <4cpv1n$apm@der.twinsun.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sdrc.com!thor!scjones From: larry.jones@sdrc.com (Larry Jones) Newsgroups: comp.std.c Subject: Re: Undefined result vs. int's holding undefined values. Date: 9 Jan 1996 19:58:54 GMT Organization: SDRC Engineering Services Distribution: world Message-ID: <4cuhdu$ff2@info1.sdrc.com> References: <4ck70b$rd7@news.informix.com> <4ckms5$rd7@news.informix.com> <4cpv1n$apm@der.twinsun.com> NNTP-Posting-Host: thor.sdrc.com Originator: scjones@thor