From -8529119465887169835
X-Google-Thread: f78e5,174aa7b34b06a51
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news1.google.com!news3.google.com!news.glorb.com!newsgate.cistron.nl!peer.news.zetnet.net!194.159.246.34.MISMATCH!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!stump.algebra.com!devnull
From: hyrosen@mail.com (Hyman Rosen)
Newsgroups: comp.std.c++
Subject: Re: Is this really unspecified behavior?
Date: Sat, 24 Dec 2005 14:20:00 GMT
Lines: 37
Sender: mail2news@demon.net
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <200512231746.jBNHk0uC040526@horus.isnic.is>
References: <1132759176.368850.264850@g43g2000cwa.googlegroups.com>
 <H1phf.161529$zb5.99785@bgtnsc04-news.ops.worldnet.att.net>
 <1132933832.802917.153350@g14g2000cwa.googlegroups.com>
 <1133551647.532929.325730@z14g2000cwz.googlegroups.com>
 <1133583412.951239.208510@g49g2000cwa.googlegroups.com>
 <E1EjGBD-0005T8-00@chx400.switch.ch>
 <1133910546.716987.80030@g14g2000cwa.googlegroups.com>
 <E1EjzL6-0006ic-00@chx400.switch.ch>
 <0l5ep1ppfhdj5p1pcu7e4na4ub0vjajlq3@4ax.com>
 <200512201408.jBKE8g64093941@mailbox7.ucsd.edu>
 <1135116348.175747.219310@f14g2000cwb.googlegroups.com>
 <E1Ep3x5-0005JD-00@chx400.switch.ch>
 <1135179561.238816.222930@g47g2000cwa.googlegroups.com>
 <7bRhIfBCg9qDFwwW@robinton.demon.co.uk>
NNTP-Posting-Host: news.news.demon.net
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: news.demon.co.uk 1135434008 2824 158.152.254.254 (24 Dec 2005 14:20:08 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Sat, 24 Dec 2005 14:20:08 +0000 (UTC)
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
X-Accept-Language: en-us, en
X-Virus-Scanned: amavisd-new at cs.mu.OZ.AU
X-Received: (from fjh@localhost)
	by mulga.cs.mu.OZ.AU (8.12.10+Sun/8.12.9/Submit) id jBOEK0TF023061;
	Sun, 25 Dec 2005 01:20:00 +1100 (EST)
X-Path: comp-std-cpp-robomod!not-for-mail
X-Delivered-To: std-c++@ucar.edu
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Newsgroups: comp.std.c++
Xref: g2news1.google.com comp.std.c++:2902

Francis Glassborow wrote:
> It also breaks implementations, and ones that have excellent optimisers 
> may be broken in ways that require a major redesign of the optimiser.

Again, I point out that optimizers are perfectly
capable of dealing with sequences of ststements.
It would be hard to characterize as "excellent"
an optimizer which could not do so. Therefore,
it is difficult to see how requiring a particular
sequence of evaluations in an expression would
break an optimizer. After all, I can rewrite an
expression to make the order explicit. If I have
     int a(), b();
     void f(int, int);
     f(a(), b());
then I can do
     const int &va = a();
     const int &vb = b();
     f(va, vb);
If I have (the currently undefined)
     extern int a[], i;
     a[i++] = ++i;
then I can do
     i++;
     int &ra = a[i];
     ++i;
     ra = i;
So unless we have this mythical smart/stupid optimizer
which is brilliant in the first cases and clueless in
the second, nothing is going to break;

---
[ 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://www.jamesd.demon.co.uk/csc/faq.html                       ]



