Re: Order of argument evaluation in C++, etc.

bobduff@world.std.com (Robert A Duff)
Mon, 21 Aug 1995 16:19:15 GMT

          From comp.compilers

Related articles
[28 earlier articles]
Re: Order of argument evaluation in C++, etc. ok@cs.rmit.edu.au (1995-08-16)
Re: Order of argument evaluation in C++, etc. msb@sq.com (1995-08-18)
Re: Order of argument evaluation in C++, etc. ka@socrates.hr.att.com (1995-08-19)
Re: Order of argument evaluation in C++, etc. hbaker@netcom.com (1995-08-21)
Re: Order of argument evaluation in C++, etc. chase@centerline.com (1995-08-21)
Re: Order of argument evaluation in C++, etc. chase@centerline.com (1995-08-21)
Re: Order of argument evaluation in C++, etc. bobduff@world.std.com (1995-08-21)
Re: Order of argument evaluation in C++, etc. jan@neuroinformatik.ruhr-uni-bochum.de (1995-08-21)
Re: Order of argument evaluation in C++, etc. bill@amber.ssd.hcsc.com (1995-08-21)
Re: Order of argument evaluation in C++, etc. burley@gnu.ai.mit.edu (1995-08-23)
Re: Order of argument evaluation in C++, etc. jthill@netcom.com (1995-08-24)
Re: Order of argument evaluation in C++, etc. hbaker@netcom.com (1995-08-23)
Re: Order of argument evaluation in C++, etc. way@cis.udel.edu (Thomas Way) (1995-08-23)
[8 later articles]
| List of all articles for this month |

Newsgroups: comp.compilers
From: bobduff@world.std.com (Robert A Duff)
Keywords: C++, optimize
Organization: The World Public Access UNIX, Brookline, MA
References: 95-08-034 95-08-135
Date: Mon, 21 Aug 1995 16:19:15 GMT

Henry Baker <hbaker@netcom.com> wrote:
>Since I started this thread, I have noticed that it has veered considerably
>off course.


Yeah. That tends to happen on the net. ;-)


>...Although I agree with David Chase that the issue of left-to-right v.
>right-to-left is silly, I was willing to punt on that particular issue.
>However, if I have to worry about various breadth-first or other non-depth
>first orderings, then things get _a lot_ more complicated. In particular,
>one has to start worrying about _locking_ between the multiple 'threads'
>of the various argument expressions.


I thought somebody clearly answered that this interleaving is not
allowed in C++. I know it's not allowed in Ada (83 or 95). I
completely agree with you -- you don't want to have to do locking when
you haven't put any threads in your program! For example (in Ada
syntax):


        P(new T, new T);


where the user has written a user-defined allocator, the user should not
have to make that allocator do locking, if it's only used within one
task. I don't care which one is allocated first, but it had better not
interleave the allocator calls.


- Bob
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.