Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!edcastle!elee24 From: elee24@castle.ed.ac.uk (H Bruce) Newsgroups: comp.lang.c Subject: Order of evalution of expressions. Message-ID: <6398@castle.ed.ac.uk> Date: 18 Sep 90 16:55:09 GMT Organization: Dept. Electrical Engineering, Edinburgh University, Scotland, UK. Lines: 21 I have lost my FAQ files but I'm certain this is not on it.... Is the line value = *ptr - *ptr++; sensible C ? In other words is there a specified order of evaluation of expressions ? If not then the answer would depend on when the increment is done. If not what is the fastest way of computing this type of expression ? Would the following lines be optimized by a compiler (so that value is not loaded twice) ? value = *ptr; value -= *ptr++; Thanks, Henry Bruce.