title: do while(false) pattern
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/154136/why-are-there-sometimes-meaningless-do-while-and-if-else-statements-in-c-c-macr">Why are there sometimes meaningless do/while and if/else statements in C/C++ macros? </a>  </p>
  </blockquote>
  
  
  
  <p>Why is the <code>do while(false)</code> necessary in the macros below?</p>
  
  <pre><code>#define LOG(message, ...) \
  do { \
  Lock&lt;MutualExclusion&gt; lock (logMutex); \
  
   .... a lot of code ...
  } while (false)
  </code></pre>
  
  <p>I dont think it serves any functional purpose. Am I overlooking something?</p>