Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cca!mirror!ima!haddock!karl From: karl@haddock.ISC.COM (Karl Heuer) Newsgroups: comp.lang.c Subject: Re: another auto-increment problem Message-ID: <1278@haddock.ISC.COM> Date: Tue, 29-Sep-87 11:30:01 EDT Article-I.D.: haddock.1278 Posted: Tue Sep 29 11:30:01 1987 Date-Received: Wed, 30-Sep-87 07:24:16 EDT References: <3680001@wdl1.UUCP> <6484@sgi.SGI.COM> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Boston Lines: 15 In article <6484@sgi.SGI.COM> archer@elysium.SGI.COM (Archer Sully) writes: >The use of increment and decrement operators in function calls >is always considered non-portable, precisely because order of >evaluation isn't defined in C (cf K&R pp 212). I don't really want to get involved in this thread, but your statement is overly conservative. A statement like "f(*jp++)" is perfectly portable; the problem only occurs when you have *multiple* side effects in a single expression. (And not even then, if there is a sequence point between them.) >Remember that most C-compilers push arguments right to left ... At least on architectures where the stack grows downward. Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint