Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: X3J11 meeting notes Message-ID: <6866@brl-smoke.ARPA> Date: 18 Dec 87 22:28:17 GMT References: <6829@brl-smoke.ARPA> <406@mn-at1.UUCP> <6852@brl-smoke.ARPA> <13899@think.UUCP> <2149@ucbcad.berkeley.edu> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB) ) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 13 Keywords: ANSI C standard In article <2149@ucbcad.berkeley.edu> rudell@beeblebrox.UUCP (Richard Rudell) writes: > (a - 1) + 1 >The point is, ANSI never promised what might happen if 'a' was the most >positive integer. No, as it now stands it is not legal for an ANSI C implementation to introduce a (non-benign) overflow by rearranging an expression. Although what happens on an overflow is undefined, it is not correct to cause an overflow in violation of what the programmer actually specified. Thus, in the above example, if at run time `a' happens to have the most negative possible value, an overflow is permitted (but not required); however, for no other value of `a' is an overflow permitted.