From -2505434877190314420
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,7522e5259f7267d6
X-Google-Attributes: gidf78e5,public
From: James Kuyper <kuyper@wizard.net>
Subject: Re: x = y = z;  Undefined?
Date: 2000/01/13
Message-ID: <387D1FC3.F19D5853@wizard.net>#1/1
X-Deja-AN: 571906657
X-NNTP-Posting-Host: 209.8.153.26
Content-Transfer-Encoding: 7bit
Approved: stephen.clamage@sun.com (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> <387B6338.FCE9D984@sensor.com> <387bb7c0.39451037@news.csrlink.net> <387C7098.256766C8@wizard.net> <387cde71.28276175@news.csrlink.net>
X-Accept-Language: en,de,es,ru
X-UID: 0000000001
X-Status: $$$T
Content-Type: text/plain; charset=us-ascii
X-Trace: tw11.nn.bcandid.com 947724106 209.8.153.26 (Wed, 12 Jan 2000 17:41:46 MST)
Organization: bCandid - Powering the world's discussions - http://bCandid.com
Mime-Version: 1.0
NNTP-Posting-Date: Wed, 12 Jan 2000 17:41:46 MST
Newsgroups: comp.std.c++
Originator: clamage@taumet


John Potter wrote:
....
> I will hold to my belief that compiler writers are attempting to
> produce quality products.  I will continue to consider code which

That strikes me as a poor assumption. Just like anyone else, C++
implementors often find themselves forced to consider other issues to be
more important than quality. Some of them don't even need any forcing.

> can only be generated when there is known undefined behavior to be
> nonsense.  The standard allows it, but reality forbids it.

Reality forbids very little; far less than you're likely to be able to
reliably predict. If you consistently write code that allows undefined
behavior, because you "know" it couldn't possibly be "sanely"
mishandled, I guarantee you'll run into trouble you could have avoided,
and I expect it won't take long. When you run into that trouble, there's
a good chance the implementor will be able to you a sane explanation
that you hadn't even considered.


[ 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              ]




