Oracle® Solaris Studio 12.4: C User's Guide

Exit Print View

Updated: March 2015
 
 

6.9.1 Expression Definitions

The side effects of an expression are its modifications to memory and its accesses to volatile qualified objects. The side effects in the example expression are the updating of i and p and any side effects contained within the functions f() and g().

An expression’s grouping is the way values are combined with other values and operators. The example expression’s grouping is primarily the order in which the additions are performed.

An expression’s evaluation includes everything necessary to produce its resulting value. To evaluate an expression, all specified side effects must occur anywhere between the previous and next sequence point, and the specified operations are performed with a particular grouping. For the example expression, the updating of i and p must occur after the previous statement and by the ; of this expression statement. The calls to the functions can occur in either order, any time after the previous statement but before their return values are used. In particular, the operators that cause memory to be updated have no requirement to assign the new value before the value of the operation is used.