title: casting 0 to void
body: <p>On my implementation of C++ (Visual Studio 2008 implementation) I see the following line in <code>&lt;cassert&gt;</code></p>
  
  <pre><code>#ifdef  NDEBUG
  #define assert(_Expression) ((void)0)
  </code></pre>
  
  <p>I do not understand the need to cast 0 to void. It seems to me that</p>
  
  <pre><code>#ifdef  NDEBUG
  #define assert(_Expression) (0)
  </code></pre>
  
  <p>or even simply</p>
  
  <pre><code>#ifdef  NDEBUG
  #define assert(_Expression) 0
  </code></pre>
  
  <p>would do, considering the contexts in which <code>assert(expr)</code> can be used.</p>
  
  <p>So, what's the danger of 0 of type <strong>int</strong> instead of 0 of type <strong>void</strong> in this case? Any <strong><em>realistic</em></strong> examples?</p>