From: Endlisnis Newsgroups: comp.os.msdos.djgpp Subject: Re: Optimizer and logical operators. Date: Thu, 03 Sep 1998 18:51:22 -0300 Organization: NBTel Internet Lines: 18 Message-ID: <35EF0F5A.E34C4FDD@unb.ca> References: <4D580E8D0A378A4D DOT 13E50F10CD0F8074 DOT 909D1CC8A7C84CD0 AT library-proxy DOT airnews DOT net> NNTP-Posting-Host: fctnts12c17.nbnet.nb.ca Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk SED AT ticnet DOT com wrote: > So I should be able to rewrite: > while( (*p1 != '\0') && isspace( *p1 ) ) > ++p1; > while( (*p1 != '\0') && isspace( *(p1++) ) ); > Does the optimizer honor the expression1 && expression2 rule also? Yes. The optimizer should not change what your code does, just how it does it. There are some very rare cases (usually when you try something tricky) where the optimizer will get confused, but you shouldn't worry about these problems unless you experience them. -- (\/) Endlisnis (\/) s257m AT unb DOT ca Endlisnis AT GeoCities DOT com Endlis AT nbnet DOT nb DOT ca