title: gcc compile error: cast specifies array type
body: <p>The following code is perfect valid,</p>
  
  <pre><code>int *ia = (int[]){1,3,5,7};
  </code></pre>
  
  <p>but when I compile the next line of code,</p>
  
  <pre><code>char *p = (char[]) "abc";
  </code></pre>
  
  <p>gcc says</p>
  
  <pre><code>test.c:87: error: cast specifies array type
  </code></pre>
  
  <p>It seems they are casted in the same way. Why did the second one get an err msg?</p>
  
  <hr>
  
  <p>As you guys said, "abc" is a pointer, which cannot be converted to be a pointer. So my another question: why does</p>
  
  <pre><code> char[] s = "abc";
  </code></pre>
  
  <p>is valid. How does the above line of code work when compiling?</p>