title: #elseif vs #elif (C/C++ preprocessor)
body: <p>I have found that writing</p>
  
  <pre><code>#ifdef ...
  #elseif defined(...)
  #else
  #endif
  </code></pre>
  
  <p>always results in using either the #ifdef or the #else condition, never the #elseif.  But substituting #elif causes it to work as expected based on what's defined.  What convoluted purpose, if any, is served by the existence of #elseif?  And if none, why doesn't the preprocessor complain?</p>
  
  <p>Maybe this is why for years (decades, really), I've been using ugly #else/#endif blocks, since at least they're reliable!</p>