title: What is the purpose of an 'if (0)' block in if-else block?
body: <p>My question is about the line I have mentioned in the subject and which I can see in many places inside the production code.</p>
  
  <p>The overall code looks like this:</p>
  
  <pre><code>if (0) {
      // Empty braces
  } else if (some_fn_call()) {
      // actual code
  } else if (some_other_fn_call()) {
      // another actual code
      ...
  } else {
      // default case
  }
  </code></pre>
  
  <p>The other branches are irrelevant to my question. I'm wondering what the meaning of putting <code>if (0)</code> here is. The braces are empty, so I don't think that it is supposed to comment some block of code. Does it force the compiler to make some optimization or are its intentions different?</p>
  
  <p>I have tried to search for this explicit case here on SO and on the internet, but with no success. There're similar questions about JavaScript, but not C. There's another question, <a href="https://stackoverflow.com/questions/17540692/what-happens-when-a-zero-is-assigned-in-an-if-condition">What happens when a zero is assigned in an `if` condition?</a>, but it discusses zero assignment to a variable, not the 'if (0)' usage itself.</p>