title: C compiling error: stray '##' in program
body: <p>I was working with an embedded kernel source when I saw something like this:</p>
  
  <pre><code>#define OMAP_SYS_TIMER_INIT(name, clkev_nr, clkev_src, clksrc_nr, clksrc_src) \
  static void __init omap##name##_timer_init(void)                              \
  {                                                                             \
      omap2_gp_clockevent_init((clkev_nr), clkev_src);                          \
      omap2_gp_clocksource_init((clksrc_nr), clksrc_src);                       \
  }
  </code></pre>
  
  <p>and when I tryed to make a program that used this ## thing (that I don't know the name) to see what it could really do I didn't got it to work. Below is what I did to test it's function. I just want to see if the argument inside the ## is literal or not, but something is clearly missing in my code for it to compile... </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  #define DEFINE_1 2
  #define DEFINE_2 4
  #define DEFINE_3 6
  
  #define DEFINE_i 9
  
  int main(void)
  {
    int i;
    for(i=1;i&lt;4;i++) {
      printf("numero %d = %d\n",i,DEFINE_##i##);
    }
    return EXIT_SUCCESS;
  }
  </code></pre>
  
  <p>The output of gcc is:</p>
  
  <pre><code>test.c: In function ‘main’:
  test.c:14:5: error: stray ‘##’ in program
  test.c:14:33: error: ‘DEFINE_’ undeclared (first use in this function)
  test.c:14:33: note: each undeclared identifier is reported only once for each function it appears in
  test.c:14:42: error: expected ‘)’ before ‘i’
  test.c:14:42: error: stray ‘##’ in program
  </code></pre>
  
  <p>Anyone knows what is wrong? Thanks</p>