Re: Unsafe Optimizations (WAS: Compiler Design in C How about it?)

cwitty@csli.Stanford.EDU (Carl Witty)
Thu, 14 Jun 90 03:24:37 GMT

          From comp.compilers

Related articles
[5 earlier articles]
Re: Unsafe Optimizations (WAS: Compiler Design in C How about it?) robinson@cs.dal.ca (1990-06-05)
Unsafe Optimizations (WAS: Compiler Design in C How about it?) stewart@sdsu.edu (1990-06-05)
Re: Unsafe Optimizations (WAS: Compiler Design in C How about it?) poser@csli.stanford.edu (1990-06-06)
Re: Unsafe Optimizations (WAS: Compiler Design in C How about it?) larus@primost.cs.wisc.edu (1990-06-07)
Re: Unsafe Optimizations (WAS: Compiler Design in C How about it?) tli@%phakt.usc.edu (1990-06-07)
Re: Unsafe Optimizations (WAS: Compiler Design in C How about it?) moss@cs.umass.edu (1990-06-10)
Re: Unsafe Optimizations (WAS: Compiler Design in C How about it?) cwitty@csli.Stanford.EDU (1990-06-14)
Re: Unsafe Optimizations (WAS: Compiler Design in C How about it?) moss@cs.umass.edu (1990-06-14)
Re: Unsafe Optimizations (WAS: Compiler Design in C How about it?) pardo@june.cs.washington.edu (1990-06-15)
| List of all articles for this month |

Newsgroups: comp.compilers
From: cwitty@csli.Stanford.EDU (Carl Witty)
Date: Thu, 14 Jun 90 03:24:37 GMT
Organization: Compilers Central
Keywords: code, optimize

  I would like to note that a number of languages are standardized such that
  order of evaluation of certain items is *not specified*, ...


      [Indeed, such ambiguity is more the rule than the exception. Fortran and C
      are both standardized that way. -John]


I believe that this is not true for C. Instead, the rule is that
the order of evaluation is exactly that specified by the precedence
rules of the language, except in cases where it can be proven not to
make a difference. (For example, on many machines, integer arithmetic
really is commutative and associative.)


Carl Witty
cwitty@jessica.stanford.edu
[Of course, I don't know what I was thinking. The current Journal of C
Language Translation has an interesting article by P. J. Plaugher in a
somewhat related vein on how the extremely tightly specified sequencing
semantics of C make it very hard to optimize for machines with parallel or
vector units. -John]
--


Post a followup to this message

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