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

mfinney@inmind.com
Thu, 10 Aug 1995 19:35:12 GMT

          From comp.compilers

Related articles
[14 earlier articles]
Re: Order of argument evaluation in C++, etc. chase@centerline.com (1995-08-07)
Re: Order of argument evaluation in C++, etc. hbaker@netcom.com (1995-08-08)
Re: Order of argument evaluation in C++, etc. graham.matthews@pell.anu.edu.au (1995-08-08)
Re: Order of argument evaluation in C++, etc. det@sw.stratus.com (David Toland) (1995-08-08)
Re: Order of argument evaluation in C++, etc. jthill@netcom.com (1995-08-10)
Re: Order of argument evaluation in C++, etc. chase@centerline.com (1995-08-11)
Re: Order of argument evaluation in C++, etc. mfinney@inmind.com (1995-08-10)
Re: Order of argument evaluation in C++, etc. hbaker@netcom.com (1995-08-10)
Re: Order of argument evaluation in C++, etc. chase@centerline.com (1995-08-11)
Re: Order of argument evaluation in C++, etc. eggert@twinsun.com (1995-08-13)
Re: Order of argument evaluation in C++, etc. rfg@rahul.net (Ronald F. Guilmette) (1995-08-14)
Re: Order of argument evaluation in C++, etc. graham.matthews@pell.anu.edu.au (1995-08-16)
Re: Order of argument evaluation in C++, etc. bobduff@world.std.com (1995-08-16)
[22 later articles]
| List of all articles for this month |
Newsgroups: comp.compilers
From: mfinney@inmind.com
Keywords: C++, optimize, design
Organization: In Mind, Inc.
References: 95-08-067 95-08-075
Date: Thu, 10 Aug 1995 19:35:12 GMT

I have been "lurking" in this debate for a week or so. I have to say
that I do NOT want order of evaluation specified except that all
operators in a full expression should be complete at the end of the
full expression. In the draft C++ standard that includes side
effects such as the destruction of temporaries.


I would go further, and say that point is the point where ++ or --
operations occur (semantically), so that statements like "x[i] = i++"
are well defined. However, I see NO benefit in tying down the order
of evaluation any tighter than that EXCEPT for floating point, and
the optimizers generally are not allowed to rearrange floating point
as much as they can rearrange fixed point.


Its true, that having to use the full expression technique to control
order of evaluation is very "low level" and even assembly-like. But
that is EXACTLY what you are doing when you are controlling the order
of evaluation. That doesn't differ from controlling exact register
usage in that aspect. When you want low-level control it is
appropriate to have to use low level code.


I think that the full expression definition is not just defined
because of the dusty deck problem, but it is, in fact, the CORRECT
definition.


Michael Lee Finney
--


Post a followup to this message

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