On 07/07/2011 07:09 PM, Jim Peters wrote:
Unwanted side effects can happen if you evaluate an expression more
than once, e.g. if you substituted the full expression for every
_tmp2_ in the C code.  Expressions with side-effects include function
calls and stuff which modifies variables, e.g. p++.  You don't want to
do 'p++' twice or call the function twice.

As the other poster said, C compilers are very good at optimising away
temporary variables.

Jim
Thanks.
I give a clearer example of what you're saying:

y = x++ + --x;

The result depends of compiler.
_______________________________________________
vala-list mailing list
vala-list@gnome.org
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to