Path: utzoo!utgpu!water!watmath!clyde!burl!codas!killer!jfh
From: jfh@killer.UUCP (John Haugh)
Newsgroups: comp.lang.c
Subject: Re: Autoincrement question
Summary: No, it is actually implementation independent ...
Message-ID: <2381@killer.UUCP>
Date: 8 Dec 87 18:23:49 GMT
References: <1507@ogcvax.UUCP> <7507@alice.UUCP>
Organization: Big "D" Home for Wayward Hackers
Lines: 25

In article <7507@alice.UUCP>, ark@alice.UUCP writes:
> In article <1507@ogcvax.UUCP>, schaefer@ogcvax.UUCP writes:
> > The real question is:  Is the order of evaluation in a statement like
> > 	bar->tmp = bar++;
> > well-defined, or is it implementation-dependent?
> 
> It is implementation-dependent.

No, it is guaranteed to produce different results on all machines.  I thnk
that qualifies it for being implementation independent doesn't it ;-))) ?

The obvious answer to how to code that is

	bar->tmp = bar;		or	(bar + 1)->tmp = bar;
	bar++;				bar++;

I'm not going to pretend to know _what_ you intended.  Your example is not
only barfed from a C point of view, I wouldn't want to see it.

- John.
-- 
John F. Haugh II                  SNAIL:  HECI Exploration Co. Inc.
UUCP: ...!ihnp4!killer!jfh                11910 Greenville Ave, Suite 600
      ...!ihnp4!killer!rpp386!jfh         Dallas, TX. 75243
"Don't Have an Oil Well?  Then Buy One!"  (214) 231-0993