Oracle® Solaris Studio 12.4: C User's Guide

Exit Print View

Updated: March 2015
 
 

6.9.4 Parentheses Usage

ISO C is often erroneously described as honoring parentheses or evaluating according to parentheses due to an incomplete understanding or an inaccurate presentation.

Because ISO C expressions have the grouping specified by their parsing, parentheses serve only as a way of controlling how an expression is parsed. The natural precedence and associativity of expressions carry exactly the same weight as parentheses.

The previous expression could have been written as follows with no different effect on its grouping or evaluation.

i = (((*(++p)) + f()) + g());