title: Macro for function declaration not working
body: <p>I want to use a macro in order to easily change a function declaration, here is what I have for now :</p>
  
  <pre><code>#define MYDECLARATION(name)   void name (void)
  </code></pre>
  
  <p>When I call MYDECLARATION(my_thread); I get an error:</p>
  
  <blockquote>
    <p>identifier-list paramters may only be used in a function definition.</p>
  </blockquote>
  
  <p>I tried to use ## like that : </p>
  
  <pre><code>#define MYDECLARATION(name)   void  ##name (void)
  </code></pre>
  
  <p>but I am pretty sure I will get : <code>voidmythread (void)</code> in my code. Do you have any idea on how to do it ?</p>
  
  <p>I am also interested if you know some nice tutorials about macros in general.</p>
  
  <hr>
  
  <p>In response to bitmask comment : </p>
  
  <p>I am using KEIL compiler then my thread are working as follow : </p>
  
  <pre><code> #define MYDECLARATION(name)   __task void name(void)
  </code></pre>
  
  <p>My call : </p>
  
  <pre><code> MYDECLARATION(Mythread); 
  </code></pre>
  
  <p>My definition :</p>
  
  <pre><code>__task void Mythread(void)
  {
    //...
  }
  </code></pre>
  
  <p>New test : </p>
  
  <pre><code>#define RET_TEST     __task void
  #define PARAMETER    void
  
   RET_TEST MYDECLARATION(PARAMETER);
  </code></pre>
  
  <p>This is working... So I guess it's the fact to use a macro parameter into a function name which is not working...</p>