title: How to disable a warning within a C++ macro
body: <p>In Visual C++ you can temporarily disable a warning by using pragma:</p>
  
  <pre><code>#pragma warning(suppress: 4307)
  </code></pre>
  
  <p>How can I disable a warning within a macro, e.g., when I cause an "integral constant overflow" warning like this:</p>
  
  <pre><code>#define TIMES_A_MILLION(x) x * 1000000
  int value = TIMES_A_MILLION(4711);
  </code></pre>
  
  <p>I don't want to repeat the warning at every place where the macro is used, but want the suppression to be part of the macro it self.</p>
  
  <p>It is obviously not possible to do like this:</p>
  
  <pre><code>#define TIMES_A_MILLION(x) \
  #pragma warning(suppress: 4307) \
    x * 1000000
  </code></pre>