title: Is the if - else redundant in this macro?
body: <p>This is a follow up to this question:</p>
  
  <p><a href="https://stackoverflow.com/questions/923822/whats-the-use-of-do-while0-when-we-define-a-macro">What&#39;s the use of do while(0) when we define a macro?</a></p>
  
  <p>This macro is used in the Qt unit tests:</p>
  
  <pre><code>#define QVERIFY2(statement, description) \
  do {\
      if (statement) {\
          if (!QTest::qVerify(true, #statement, (description), __FILE__, __LINE__))\
              return;\
      } else {\
          if (!QTest::qVerify(false, #statement, (description), __FILE__, __LINE__))\
              return;\
      }\
  } while (0)
  </code></pre>
  
  <p>It verifies the statement, and if it is false it produces an error message with the given description.</p>
  
  <p>My question is, what could be the reason for the <code>if</code> - <code>else</code> statement inside? Why isn't it defined simply like this?</p>
  
  <pre><code>#define QVERIFY2(statement, description) \
  do {\
      if (!QTest::qVerify(statement, #statement, (description), __FILE__, __LINE__))\
          return;\
      }\
  } while (0)
  </code></pre>
  
  <p>I suspect that the explaination is of the same sort as in the refered question. Any ideas?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>To give some more context, the following variant of the macro, without the description, is also defined:</p>
  
  <pre><code>#define QVERIFY(statement) \
  do {\
      if (!QTest::qVerify((statement), #statement, "", __FILE__, __LINE__))\
          return;\
  } while (0)
  </code></pre>
  
  <p>This would suggest, that the trick somehow concerned with the <code>description</code> parameter.</p>