From 905168825739217450 X-Google-Thread: f78e5,174aa7b34b06a51 X-Google-Attributes: gidf78e5,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!newsfeed.vmunix.org!peer-uk.news.demon.net!kibo.news.demon.net!news.demon.co.uk!demon!stump.algebra.com!devnull From: ron@spamcop.net (Ron Natalie) Newsgroups: comp.std.c++ Subject: Re: Is this really unspecified behavior? Date: Thu, 8 Dec 2005 15:35:55 GMT Organization: Newshosting.com - Highest quality at a great price! www.newshosting.com Lines: 39 Sender: mail2news@demon.net Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++) Message-ID: <43982e73$0$28446$9a6e19ea@news.newshosting.com> References: <1132629737.664847.151630@o13g2000cwo.googlegroups.com> <1132662585.882464.24110@f14g2000cwb.googlegroups.com> <1132759176.368850.264850@g43g2000cwa.googlegroups.com> <1132933832.802917.153350@g14g2000cwa.googlegroups.com> <1133551647.532929.325730@z14g2000cwz.googlegroups.com> <1133583412.951239.208510@g49g2000cwa.googlegroups.com> <1133887764.580879.73650@g44g2000cwa.googlegroups.com> <1133930423.435930.262110@g14g2000cwa.googlegroups.com> NNTP-Posting-Host: news.news.demon.net Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.demon.co.uk 1134056162 14825 158.152.254.254 (8 Dec 2005 15:36:02 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Thu, 8 Dec 2005 15:36:02 +0000 (UTC) X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov) X-User-Agent: Thunderbird 1.4 (Windows/20050908) X-Greylisting: DELAYED for 00:06:34; processed by UCSD_GL-v2.1 on mailbox7.ucsd.edu; Thu, 08 December 2005 05:13:31 -0800 (PST) X-Virus-Scanned: amavisd-new at cs.mu.OZ.AU X-Path: comp-std-cpp-robomod!not-for-mail X-Received: (from fjh@localhost) by mulga.cs.mu.OZ.AU (8.12.10+Sun/8.12.9/Submit) id jB8FZsjs004605; Fri, 9 Dec 2005 02:35:54 +1100 (EST) X-Delivered-To: std-c++@ucar.edu X-Spamscanner: mailbox7.ucsd.edu (v1.6 Aug 4 2005 15:27:38, 0.0/5.0 3.0.4) X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f X-Newsgroups: comp.std.c++ X-MailScanner: PASSED (v1.2.8 82435 jB8DDSvU013180 mailbox7.ucsd.edu) Xref: g2news1.google.com comp.std.c++:2704 kuyper@wizard.net wrote: > > cout << f() << g(); > > This expression involves four function calls: > A: f() > B: cout.operator<<() > C: g() > D: cout.operator<<(f()).operator<<() > > Let t(X) be the time at which function X is evaluated. Since function > > There are exactly two orderings consistent with all of those > constraints: > > t(A) < t(B) < t(C) < t(D) > > t(C) < t(A) < t(B) < t(D) > > and there's no other requirement in the standard that is violated by > either of those orderings. Therefore, if it matters whether f() is > called before or after the call to g(), you've got problems. > Nope. There are more. There is nothing that requires A and C to have any relative ordering. A, C, B, D is another allowable ordering. --- [ 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 ]