Path: utzoo!utgpu!news-server.csri.toronto.edu!dgp.toronto.edu!flaps Newsgroups: comp.lang.c From: flaps@dgp.toronto.edu (Alan J Rosenthal) Subject: Re: Order of evalution of expressions. Message-ID: <1990Sep18.173551.12941@jarvis.csri.toronto.edu> References: <6398@castle.ed.ac.uk> Date: 18 Sep 90 21:35:51 GMT Lines: 17 elee24@castle.ed.ac.uk (H Bruce) writes: >Is the line > >value = *ptr - *ptr++; > >sensible C ? absolutely not. >Would the following lines be optimized by a compiler (so that value is >not loaded twice) ? > >value = *ptr; >value -= *ptr++; quite often, but no non-machine-specific language definition can guarantee you that. but they're the best.