title: Cross-platform defining #define for macros __FUNCTION__ and __func__
body: <p>Compiling with gcc 4.4.2 and WinXP Visual Studio C++ 2008 </p>
  
  <pre><code>#if defined ( WIN32 )
  #define __FUNCTION__ __func__
  #endif
  </code></pre>
  
  <p>As I want to use the macro to display the function name. I have done the above so I can cross-platform, and use the same <strong>func</strong> when compiling on linux or windows.</p>
  
  <p>However, when I am compiling on WinXP I get the following error:</p>
  
  <pre><code>__func__ undeclared identifier
  </code></pre>
  
  <p>Can I not #define a macro like this?</p>
  
  <p>Many thanks for any suggestions,</p>