This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Multiple assignements
- To: seba <sebax at tin dot it>
- Subject: Multiple assignements
- From: Gavin Romig-Koch <gavin at cygnus dot com>
- Date: Tue, 10 Aug 1999 08:38:52 -0400 (EDT)
- Cc: gcc-bugs at gcc dot gnu dot org
- References: <37AFFAE5.38A4C314@tin.it>
seba writes:
> I've tried the little program attached below on these different
> compilers:
> ...
> with no particular command-line options, the output was different. Maybe
> the behaviour is undefined in this case ? Thanks.
Yes. In this statment:
p2->next->prev = p2->next = p2;
It is undefined whether the first "p2->next" is evaluated before
or after the assignment to "p2->next".
-gavin...