This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/1520
- To: nobody at gcc dot gnu dot org
- Subject: Re: c++/1520
- From: nathan at gcc dot gnu dot org
- Date: 15 Jan 2001 09:26:01 -0000
- Cc: gcc-prs at gcc dot gnu dot org,
- Reply-To: nathan at gcc dot gnu dot org
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