This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: c++/1520


The following reply was made to PR c++/1520; it has been noted by GNATS.

From: nathan@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org, magnus@gol.com, nobody@gcc.gnu.org
Cc:  
Subject: Re: c++/1520
Date: 15 Jan 2001 09:24:17 -0000

 Synopsis: cout prints in the wrong order.
 
 State-Changed-From-To: feedback->closed
 State-Changed-By: nathan
 State-Changed-When: Mon Jan 15 01:24:17 2001
 State-Changed-Why:
     The 2nd and 3rd attachments are the real code. This invokes an
     unspecified evaluation ordering on
     	cout << "first" << examine ();
     which reduces to
     	op<< (op<< (cout, "first), examine ());
     the arguments to the outer op<< call are evaluated in an
     unspecified order, hence any side effects of examine (), 
     can occur before or after any side effects of the inner
     op<< call.
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=1520&database=gcc

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]