Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!ginosko!uunet!zephyr.ens.tek.com!tektronix!sequent!paulr
From: paulr@sequent.UUCP (Paul Reger)
Newsgroups: comp.lang.c
Subject: Re: comma operator
Message-ID: <20348@sequent.UUCP>
Date: 17 Aug 89 21:43:47 GMT
References: <63244@linus.UUCP> <2300@oakhill.UUCP> <2650@aplcen.apl.jhu.edu>
Reply-To: paulr@crg3.UUCP (Paul Reger)
Organization: Sequent Computer Systems, Inc
Lines: 14

Considering the construction:

while ((ch = getchar()) != EOF && ch != '\n')

Is there any assurance in any C standard that the left expression will
always be evaluated first, with the right following it ??  I mean for
purposes of optimization, the right should be evaluated first, unless
there is something in some standard somewhere limiting such
optimizations...

I'm from Ada-land where such problems are handled by the 'and then'
clause.

Anybody know ???