title: Parenthesis in define macros
body: <p>When is it is <strong>necessary</strong> to put the whole (right) expression of a define macro in parenthesis?</p>
  
  <p>If I do something like</p>
  
  <pre><code>#define SUM(x, y) ((x)+(y))
  </code></pre>
  
  <p>I have to put the right expression into parenthesis, because "+" has a low precedence in C (and it wouldn't work if I would use it in the following context <code>SUM(x, y) * 5U</code>)</p>
  
  <p>Are these parenthesis still required if I use an operator of the highest precedence e.g.</p>
  
  <pre><code>#define F foo()
  </code></pre>
  
  <p>or even</p>
  
  <pre><code>#define ACCESS(x, y) (x)-&gt;(y)
  </code></pre>
  
  <p>Does an expression exist that  that would break the actual meaning as it would do for the <code>SUM()</code> example?)</p>
  
  <p>For the precedence rules  I used <a href="http://en.cppreference.com/w/c/language/operator_precedence" rel="nofollow">http://en.cppreference.com/w/c/language/operator_precedence</a></p>