title: gcc warnings for no-effect statements.
body: <p>I have a logging macro which in release mode becomes:</p>
  
  <pre><code>#define LOG (void)
  </code></pre>
  
  <p>So statement</p>
  
  <pre><code>LOG("foobar %d", 0xbabecafe);
  </code></pre>
  
  <p>is expanded to</p>
  
  <pre><code>(void)("foobar %d", 0xbabecafe);
  </code></pre>
  
  <p>The problem is that the last expression produces an warning under gcc:</p>
  
  <pre><code>warning: left-hand operand of comma expression has no effect [-Wunused-value]
  </code></pre>
  
  <p>How can I change the logging macro such that no warning is issued? (Note, that I don't want to add compiling flag <code>-Wunused-value</code>).</p>
  
  <p><strong>EDIT</strong> I see already a couple of answers involving <code>(...)</code>. The same file is compiled under Minix which doesn't support variadic macros. The best would be to have a C89 conforming solution. While your answer is correct (and I upvoted it), it is my fault that I didn't include this small detail.</p>