From: wirzeniu@klaava.Helsinki.FI (Lars Wirzenius) Subject: Re: GCC 2.2.2d bug Date: 7 Sep 1992 14:19:48 GMT
When discussing ``p = p++'', system@kryton.UUCP (Scott Beckstead)
writes:
>Indeed very poor code. The final result will be 11. because even if
>the assign works properly the increment will still happen.
Wrong. There is no single correct answer (except a core dump). The
assignment and increment can happen in any order, since they occur in
the same interval between two sequence points. Go read the comp.lang.c
FAQ, the standard, and any decent book on C about sequence points.
Please. I have included an extract of the C FAQ, in order to kill this
thread. It is irrelevant to Linux, and IMHO doesn't need any more
posts, since the subject has already been discussed to death in other
newsgroups (c.l.c. and comp.std.c).