title: Temporarily overwrite a macro in C preprocessor
body: <p>I need to temporarily overwrite a macro and then restore it. Like:</p>
  
  <pre><code>#define FOO X
  #save FOO
  #define FOO Y
  ...
  #restore FOO
  </code></pre>
  
  <p>Is it possible in standard C preprocessor? In GCC?</p>
  
  <p><strong>ADDED</strong>. About real world example. I use a global macro for error exception. It acts like <code>assert</code>, but for persistent usage, not only for debug versions; so, for example, I usually call functions (with side-effect) inside the macro. It's defined once, but the definition isn't persistent; therefore I don't know it a-priori. For some piece of code I need its own, modified version of the macro, but I want to <em>save general style of code</em>. It's looks ugly when one part of code uses the one macro, other part uses other macro -- both macros have the <em>same purpose</em>, but slightly different implementation.</p>
  
  <p>So, it's good for me to save original macro temporarily, use different version for a part of code, after that restore original macro.</p>