Topic: interleaved evaluation of function arguments


Author: swf@elsegundoca.ncr.com (Stan Friesen)
Date: 1996/09/27
Raw View
In article <KANZE.96Sep24124901@slsvhkt.lts.sel.alcatel.de>, kanze@lts.sel.alcatel.de (James Kanze US/ESC 60/3/141 #40763) writes:
|>
|> I don't know what the the current draft says about this; I think it
|> expressedly forbids it.  ...

Last time I looked it did - about as directly as one could imagine.

I doubt it has changed.

--
swf@elsegundoca.ncr.com  sarima@ix.netcom.com

The peace of God be with you.


[ 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         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]





Author: Trevor Yann <ty@kodak.com.au>
Date: 1996/09/23
Raw View
Is there any restriction on the evaluation of function arguments that prevents
interleaved evaluation?

e.g.

int foo()
{
 cout << '0';
 cout << '1';
 return 0;
}

int bar()
{
 cout << 'A';
 cout << 'B';
 return 0;
}

void f(int, int);

f(foo(), bar());

The output is allowed to be 01AB and AB01, becuase there is no sequence point
between the evaluation of foo() and bar(). Is the output also allowed to be 0AB1,
0A1B, A01B, A0B1?



Author: kanze@lts.sel.alcatel.de (James Kanze US/ESC 60/3/141 #40763)
Date: 1996/09/24
Raw View
In article <324703C6.44D8@kodak.com.au> Trevor Yann <ty@kodak.com.au>
writes:

|> Is there any restriction on the evaluation of function arguments that prevents
|> interleaved evaluation?

I don't know what the the current draft says about this; I think it
expressedly forbids it.  I believe that there was a defect report (or a
request for interpretation )for C with this very question, and the
response was that although the order of the function calls was not
defined, there must be some order.  Interleaving the function calls was
not allowed.
--
James Kanze         Tel.: (+33) 88 14 49 00        email: kanze@gabi-soft.fr
GABI Software, Sarl., 8 rue des Francs-Bourgeois, F-67000 Strasbourg, France
Conseils,    tudes et r   alisations en logiciel orient    objet --
                -- A la recherche d'une activit    dans une region francophone
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu
]