From 5400020750152752184
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,7522e5259f7267d6
X-Google-Attributes: gidf78e5,public
From: Hyman Rosen <hymie@prolifics.com>
Subject: Re: x = y = z;  Undefined?
Date: 2000/01/12
Message-ID: <t7d7r8xyxm.fsf@calumny.jyacc.com>#1/1
X-Deja-AN: 571285271
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
References: <MPG.12ddaa92533ae9679896a6@news.supernews.com> <t7so0bqea7.fsf@calumny.jyacc.com> <3876254a.30903561@news.csrlink.net> <derobert-9FC87E.01591309012000@news.erols.com> <3879ca08.3142429@news.csrlink.net> <derobert-8223E1.23372510012000@news.erols.com> <387b3c32.7816532@news.csrlink.net>
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au
X-Trace: mail2news.demon.co.uk 947616193 mail2news:20344 mail2news mail2news.demon.co.uk
Organization: PANIX Public Access Internet and UNIX, NYC
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
Nntp-Posting-Date: 11 Jan 2000 18:09:32 GMT
Newsgroups: comp.std.c++

jpotter@falcon.lhup.edu (John Potter) writes:
> The undefined behavior involves the final value of i1.  The compiler
> is not required to check for undefined behavior and there is no
> reason to expect that it does check.  It is required to compute the
> value 5.  Your code above does not compute the value 5.

No. If a program execution encounters undefined behavior, the Standard
imposes no requirements at all on any portion of the execution, before
or after the undefined behavior is encountered.

This is explicitly stated in 1.9/5.

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]




