title: C : why is that cast of void function to "pointer to function returning pointer to pointer to void" possible
body: <pre><code>#include &lt;stdio.h&gt;
  
  void hello() {
      printf(&quot;hello world\n&quot;);
  }
  
  int main() {
      void *(*gibberish)() = (void *(*)())hello;
      (*gibberish)();
      void (*simple)() = &amp;hello;
      (*simple)();
      return 0;
  }
  </code></pre>
  <pre><code>$ cc pt_func.c &amp;&amp; ./a.out
  hello world
  hello world
  </code></pre>
  <p>Hi, pointers to function in c confuse me. The second definition (simple) is quite clear : we take the adress of hello, and put it in a pointer to function that we can use.</p>
  <p>However, the first one is a bit strange to me. Why does it work ? How a void function to void can be cast to a pointer to function returning pointer to void ?</p>
  <p>What does the compiler do with such a cast ?</p>